Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build on Plan 9 #349

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Expand Up @@ -13,6 +13,7 @@ jobs:
- freebsd
- ios
- linux
- plan9
- windows
goarch:
- amd64
Expand Down
2 changes: 1 addition & 1 deletion fen.go
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion kqueue.go
Expand Up @@ -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()
Expand Down
36 changes: 36 additions & 0 deletions 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
}
2 changes: 1 addition & 1 deletion windows.go
Expand Up @@ -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,
Expand Down