author | Mikael Berthe <mikael@lilotux.net> |
Sun, 11 Jul 2021 10:35:56 +0200 | |
changeset 256 | 6d9efbef00a9 |
permissions | -rw-r--r-- |
256 | 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 |
} |