2022-11-03 20:21:21 +01:00
|
|
|
//go:build darwin || dragonfly || freebsd || openbsd || linux || netbsd || solaris || windows
|
|
|
|
// +build darwin dragonfly freebsd openbsd linux netbsd solaris windows
|
2021-04-22 11:35:02 +02:00
|
|
|
|
|
|
|
package viper
|
|
|
|
|
|
|
|
import "github.com/fsnotify/fsnotify"
|
|
|
|
|
|
|
|
type watcher = fsnotify.Watcher
|
|
|
|
|
|
|
|
func newWatcher() (*watcher, error) {
|
|
|
|
return fsnotify.NewWatcher()
|
|
|
|
}
|
2023-03-23 00:40:14 +08:00
|
|
|
|
|
|
|
type Event struct {
|
|
|
|
new interface{}
|
|
|
|
old interface{}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Event) New() interface{} {
|
|
|
|
return s.new
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Event) Old() interface{} {
|
|
|
|
return s.old
|
|
|
|
}
|