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

Clarify doc comment on WatchList() #499

Merged
merged 1 commit into from Aug 10, 2022
Merged
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
2 changes: 1 addition & 1 deletion backend_inotify.go
Expand Up @@ -312,7 +312,7 @@ func (w *Watcher) Remove(name string) error {
return nil
}

// WatchList returns the directories and files that are being monitered.
// WatchList returns all paths added with Add() (and are not yet removed).
func (w *Watcher) WatchList() []string {
w.mu.Lock()
defer w.mu.Unlock()
Expand Down
2 changes: 1 addition & 1 deletion backend_kqueue.go
Expand Up @@ -332,7 +332,7 @@ func (w *Watcher) Remove(name string) error {
return nil
}

// WatchList returns the directories and files that are being monitered.
// WatchList returns all paths added with Add() (and are not yet removed).
func (w *Watcher) WatchList() []string {
w.mu.Lock()
defer w.mu.Unlock()
Expand Down
2 changes: 1 addition & 1 deletion backend_windows.go
Expand Up @@ -252,7 +252,7 @@ func (w *Watcher) Remove(name string) error {
return <-in.reply
}

// WatchList returns the directories and files that are being monitered.
// WatchList returns all paths added with Add() (and are not yet removed).
func (w *Watcher) WatchList() []string {
w.mu.Lock()
defer w.mu.Unlock()
Expand Down
6 changes: 6 additions & 0 deletions mkdoc.zsh
Expand Up @@ -119,6 +119,11 @@ close=$(<<EOF
EOF
)

watchlist=$(<<EOF
// WatchList returns all paths added with Add() (and are not yet removed).
EOF
)

events=$(<<EOF
// Events sends the filesystem change events.
//
Expand Down Expand Up @@ -194,5 +199,6 @@ set-cmt '^func NewWatcher(' $new
set-cmt '^func (w \*Watcher) Add(' $add
set-cmt '^func (w \*Watcher) Remove(' $remove
set-cmt '^func (w \*Watcher) Close(' $close
set-cmt '^func (w \*Watcher) WatchList(' $watchlist
set-cmt '^[[:space:]]*Events *chan Event$' $events
set-cmt '^[[:space:]]*Errors *chan error$' $errors