Package filenotify provides a mechanism for watching file(s) for changes. Generally leans on fsnotify, but provides a poll-based notifier which fsnotify does not support. These are wrapped up in a common interface so that either can be used interchangeably in your code.
FileWatcher is an interface for implementing file notification watchers
New tries to use an fs-event watcher, and falls back to the poller if there is an error
NewEventWatcher returns an fs-event based file watcher
NewPollingWatcher returns a poll-based file watcher