spf13--viper/watch_disabled.go
Mark Sagi-Kazar 52009d3493 feat: disable watcher on aix
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2022-11-04 03:17:49 +01:00

32 lines
451 B
Go

//go:build js || aix
// +build js aix
package viper
import (
"errors"
"github.com/fsnotify/fsnotify"
)
type watcher struct {
Events chan fsnotify.Event
Errors chan error
}
func (*watcher) Close() error {
return nil
}
func (*watcher) Add(name string) error {
return nil
}
func (*watcher) Remove(name string) error {
return nil
}
func newWatcher() (*watcher, error) {
return &watcher{}, errors.New("fsnotify is not supported on WASM")
}