Skip to content

Commit

Permalink
Extended interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
joliver committed Jan 7, 2025
1 parent 9db0547 commit 46e8b43
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,6 @@ type nop struct{}

func (nop) Printf(string, ...any) {}

func (nop) Listen() {}
func (nop) Close() error { return nil }
func (nop) Initialize() error { return nil }
func (nop) Listen() {}
func (nop) Close() error { return nil }
1 change: 1 addition & 0 deletions interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package filewatcher
import "io"

type ListenCloser interface {
Initialize() error
Listen()
io.Closer
}
Expand Down
2 changes: 2 additions & 0 deletions watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,5 @@ func (this *pollingWatcher) Close() error {
this.shutdown()
return nil
}

func (this *pollingWatcher) Initialize() error { return nil }

0 comments on commit 46e8b43

Please sign in to comment.