Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gravityblast/globnotify
golang glob watcher. it watches a filesystem tree and notifies on file changes based on a glob pattern
https://github.com/gravityblast/globnotify
Last synced: about 9 hours ago
JSON representation
golang glob watcher. it watches a filesystem tree and notifies on file changes based on a glob pattern
- Host: GitHub
- URL: https://github.com/gravityblast/globnotify
- Owner: gravityblast
- License: mit
- Created: 2017-11-17T00:20:26.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-17T00:26:59.000Z (almost 7 years ago)
- Last Synced: 2024-06-19T13:46:37.591Z (5 months ago)
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# globnotify
golang glob watcher. it watches a filesystem tree and notifies on file changes based on a glob pattern.```go
package mainimport (
"fmt"
"log""github.com/pilu/globnotify"
)func main() {
w, err := globnotify.New("./**/*.css")
if err != nil {
log.Fatal(err)
}events, err := w.Watch()
if err != nil {
log.Fatal(err)
}fmt.Printf("watching...\n")
for {
select {
case event := <-events:
fmt.Printf("%+v\n", event)
}
}
}
```