Skip to content

Commit

Permalink
解决watcher定义冲突
Browse files Browse the repository at this point in the history
  • Loading branch information
beijibeijing committed Nov 12, 2021
1 parent 68f640f commit 2176554
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions watch_wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ import (
"github.com/fsnotify/fsnotify"
)

type watcher struct {
type wwatcher struct {
Events chan fsnotify.Event
Errors chan error
}

func (*watcher) Close() error {
func (*wwatcher) Close() error {
return nil
}

func (*watcher) Add(name string) error {
func (*wwatcher) Add(name string) error {
return nil
}

func (*watcher) Remove(name string) error {
func (*wwatcher) Remove(name string) error {
return nil
}

func newWatcher() (*watcher, error) {
func newWatcher() (*wwatcher, error) {
return &watcher{}, errors.New("fsnotify is not supported on WASM")
}

0 comments on commit 2176554

Please sign in to comment.