contents

package
v0.0.0-...-b19f8eb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(path string) (map[string]interface{}, bool)

Get returns a content matched with passed path.

func Index

func Index() []map[string]interface{}

Index returns contents.

func Parse

func Parse(path string) error

Parse parses contents from file at passed path.

func ParseAll

func ParseAll(dir string) error

ParseAll parses contents in passed dir.

Types

type Watcher

type Watcher struct {
	*fsnotify.Watcher
	// contains filtered or unexported fields
}

Watcher represents a watcher of changes in contents.

func NewWatcher

func NewWatcher(logger *log.Logger) (*Watcher, error)

NewWatcher returns a new Watcher.

func (*Watcher) AddAll

func (w *Watcher) AddAll(dir string) error

AddAll adds contents in passed dir to watch list.

func (*Watcher) Start

func (w *Watcher) Start()

Start starts watching contents.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL