mirror of
https://github.com/spf13/viper
synced 2025-05-10 22:27:18 +00:00
25 lines
487 B
Go
25 lines
487 B
Go
//go:build darwin || dragonfly || freebsd || openbsd || linux || netbsd || solaris || windows
|
|
// +build darwin dragonfly freebsd openbsd linux netbsd solaris windows
|
|
|
|
package viper
|
|
|
|
import "github.com/fsnotify/fsnotify"
|
|
|
|
type watcher = fsnotify.Watcher
|
|
|
|
func newWatcher() (*watcher, error) {
|
|
return fsnotify.NewWatcher()
|
|
}
|
|
|
|
type Event struct {
|
|
new interface{}
|
|
old interface{}
|
|
}
|
|
|
|
func (s *Event) New() interface{} {
|
|
return s.new
|
|
}
|
|
|
|
func (s *Event) Old() interface{} {
|
|
return s.old
|
|
}
|