watch_unsupported.go 637 B

1234567891011121314151617181920212223242526272829303132
  1. //go:build appengine || (!darwin && !dragonfly && !freebsd && !openbsd && !linux && !netbsd && !solaris && !windows)
  2. // +build appengine !darwin,!dragonfly,!freebsd,!openbsd,!linux,!netbsd,!solaris,!windows
  3. package viper
  4. import (
  5. "fmt"
  6. "runtime"
  7. "github.com/fsnotify/fsnotify"
  8. )
  9. func newWatcher() (*watcher, error) {
  10. return &watcher{}, fmt.Errorf("fsnotify not supported on %s", runtime.GOOS)
  11. }
  12. type watcher struct {
  13. Events chan fsnotify.Event
  14. Errors chan error
  15. }
  16. func (*watcher) Close() error {
  17. return nil
  18. }
  19. func (*watcher) Add(name string) error {
  20. return nil
  21. }
  22. func (*watcher) Remove(name string) error {
  23. return nil
  24. }