Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)
}
}
}
```