diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b595c7e9..e1fd549e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,6 +13,7 @@ jobs: - freebsd - ios - linux + - plan9 - windows goarch: - amd64 diff --git a/fen.go b/fen.go index b3ac3d8f..3836bf70 100644 --- a/fen.go +++ b/fen.go @@ -32,7 +32,7 @@ func (w *Watcher) Add(name string) error { return nil } -// Remove stops watching the the named file or directory (non-recursively). +// Remove stops watching the named file or directory (non-recursively). func (w *Watcher) Remove(name string) error { return nil } diff --git a/kqueue.go b/kqueue.go index 87c25b06..a93332fc 100644 --- a/kqueue.go +++ b/kqueue.go @@ -102,7 +102,7 @@ func (w *Watcher) Add(name string) error { return err } -// Remove stops watching the the named file or directory (non-recursively). +// Remove stops watching the named file or directory (non-recursively). func (w *Watcher) Remove(name string) error { name = filepath.Clean(name) w.mu.Lock() diff --git a/plan9.go b/plan9.go new file mode 100644 index 00000000..0d9a87b3 --- /dev/null +++ b/plan9.go @@ -0,0 +1,36 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build plan9 +// +build plan9 + +package fsnotify + +import "syscall" + +// Watcher watches a set of files, delivering events to a channel. +type Watcher struct { + Events chan Event + Errors chan error +} + +// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events. +func NewWatcher() (*Watcher, error) { + return nil, syscall.EPLAN9 +} + +// Close removes all watches and closes the events channel. +func (w *Watcher) Close() error { + return syscall.EPLAN9 +} + +// Add starts watching the named file or directory (non-recursively). +func (w *Watcher) Add(name string) error { + return syscall.EPLAN9 +} + +// Remove stops watching the named file or directory (non-recursively). +func (w *Watcher) Remove(name string) error { + return syscall.EPLAN9 +} diff --git a/windows.go b/windows.go index ecae0ce1..d3816609 100644 --- a/windows.go +++ b/windows.go @@ -92,7 +92,7 @@ func (w *Watcher) Add(name string) error { return <-in.reply } -// Remove stops watching the the named file or directory (non-recursively). +// Remove stops watching the named file or directory (non-recursively). func (w *Watcher) Remove(name string) error { in := &input{ op: opRemoveWatch,