ugo-spectator

module
v0.0.0-...-ee4f6db Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2020 License: MIT

README

ugo spectator logo

Ugo Spectator

The only file watcher you will ever need written in go (Golang).

Installation

go get github.com/ugo-framework/ugo-spectator

Then use it in your code use the following sysntax

package examples

import spectator "github.com/ugo-framework/ugo-spectator/lib"

func main() {
	// initialise the spectator with the dirname
	watcher, err := spectator.Init(".")
	if err != nil {
		// Handle Error
	}
	defer watcher.Close() // handle error
	// event to catch for file change
	for {
		select {
		case res := <-watcher.Ch:
			// Do Something
		}
	}
}

The full example can be viewed here This documentation is not Complete and still in its early stages

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL