postmoogle/vendor/gitlab.com/etke.cc/go/fswatcher
2023-04-09 22:19:52 +03:00
..
fswatcher.go export fswatcher to a separate library 2023-04-09 22:19:52 +03:00
LICENSE export fswatcher to a separate library 2023-04-09 22:19:52 +03:00
README.md export fswatcher to a separate library 2023-04-09 22:19:52 +03:00

fswatcher

A handy wrapper around fsnotify with deduplication

watcher := fswatcher.New([]string{"/tmp/your-file.txt"}, 0)
defer watcher.Stop()
go watcher.Start(func(e fsnotify.Event){
	// do something with event
})