vendor/github.com/spf13/viper/watch_wasm.go
changeset 265 05c40b36d3b2
parent 264 8f478162d991
child 266 80973a656b81
equal deleted inserted replaced
264:8f478162d991 265:05c40b36d3b2
     1 // +build js,wasm
       
     2 
       
     3 package viper
       
     4 
       
     5 import (
       
     6 	"errors"
       
     7 
       
     8 	"github.com/fsnotify/fsnotify"
       
     9 )
       
    10 
       
    11 type watcher struct {
       
    12 	Events chan fsnotify.Event
       
    13 	Errors chan error
       
    14 }
       
    15 
       
    16 func (*watcher) Close() error {
       
    17 	return nil
       
    18 }
       
    19 
       
    20 func (*watcher) Add(name string) error {
       
    21 	return nil
       
    22 }
       
    23 
       
    24 func (*watcher) Remove(name string) error {
       
    25 	return nil
       
    26 }
       
    27 
       
    28 func newWatcher() (*watcher, error) {
       
    29 	return &watcher{}, errors.New("fsnotify is not supported on WASM")
       
    30 }