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: 7 months 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 (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-17T00:26:59.000Z (over 8 years ago)
- Last Synced: 2025-01-05T22:36:19.996Z (over 1 year 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 main
import (
"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)
}
}
}
```