Skip to content

Commit

Permalink
Clarify doc comment on WatchList() (#499)
Browse files Browse the repository at this point in the history
  • Loading branch information
arp242 committed Aug 10, 2022
1 parent 123e4e3 commit 666da9c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
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

0 comments on commit 666da9c

Please sign in to comment.