Help us shape the future of Go! Take the 2026 Go Developer Survey

watcher

package
v0.3.1100 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WalkFiles

func WalkFiles(ctx context.Context, rootPath string, watchPattern, ignorePattern *regexp.Regexp, shouldSkip func(string) bool, out chan fsnotify.Event) (err error)

WalkFiles walks the file tree rooted at path, sending a Create event for each file it encounters.

Types

type RecursiveWatcher

type RecursiveWatcher struct {
	WatchPattern  *regexp.Regexp
	IgnorePattern *regexp.Regexp
	ShouldSkip    func(string) bool
	Events        chan fsnotify.Event
	Errors        chan error
	// contains filtered or unexported fields
}

func Recursive

func Recursive(
	ctx context.Context,
	watchPattern *regexp.Regexp,
	ignorePattern *regexp.Regexp,
	shouldSkip func(string) bool,
	out chan fsnotify.Event,
	errors chan error,
) (w *RecursiveWatcher, err error)

func (*RecursiveWatcher) Add

func (w *RecursiveWatcher) Add(dir string) error

func (*RecursiveWatcher) Close

func (w *RecursiveWatcher) Close() error

Jump to

Keyboard shortcuts

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