fwatch

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 8 Imported by: 0

README

fwatch

tests GitHub release (latest by date) GitHub

Utility to execute command when file changes

Usage

Watch current directory and execute ls when some file change:

$ fwatch ls

Watch custom directory:

$ fwatch -dir /path/to/directory ls

Ignore pattern files:

fwatch -ignore "*_test.go,*.test.js" ls

Execute command to only specific pattern:

$ fwatch -pattern "*.go,**.js*" ls

Verbose mode:

$ fwatch -V ls

Help:

fwatch -h

License

MIT

Documentation

Index

Constants

View Source
const EmptyCommandErr = FsWatchError("Could execute empty command")
View Source
const WatcherClosedError = FsWatchError("Watcher closed")

Variables

This section is empty.

Functions

This section is empty.

Types

type FsWatchError

type FsWatchError string

func (FsWatchError) Error

func (err FsWatchError) Error() string

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

func NewWatcher

func NewWatcher(dir string, cmd, pattern, ignorePattern []string, logger *log.Logger) (*Watcher, error)

func (*Watcher) Stop

func (w *Watcher) Stop() error

func (*Watcher) Watch

func (w *Watcher) Watch() error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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