Skip to content

golang glob watcher. it watches a filesystem tree and notifies on file changes based on a glob pattern

License

Notifications You must be signed in to change notification settings

gravityblast/globnotify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

globnotify

golang glob watcher. it watches a filesystem tree and notifies on file changes based on a glob pattern.

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

About

golang glob watcher. it watches a filesystem tree and notifies on file changes based on a glob pattern

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages