File: watch_wasm.go

package info (click to toggle)
golang-github-spf13-viper 1.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid, trixie
  • size: 644 kB
  • sloc: makefile: 58
file content (30 lines) | stat: -rw-r--r-- 431 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// +build js,wasm

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")
}