export fswatcher to a separate library
This commit is contained in:
11
vendor/gitlab.com/etke.cc/go/fswatcher/README.md
generated
vendored
Normal file
11
vendor/gitlab.com/etke.cc/go/fswatcher/README.md
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# fswatcher
|
||||
|
||||
A handy wrapper around [fsnotify](https://github.com/fsnotify/fsnotify) with deduplication
|
||||
|
||||
```go
|
||||
watcher := fswatcher.New([]string{"/tmp/your-file.txt"}, 0)
|
||||
defer watcher.Stop()
|
||||
go watcher.Start(func(e fsnotify.Event){
|
||||
// do something with event
|
||||
})
|
||||
```
|
||||
Reference in New Issue
Block a user