summaryrefslogtreecommitdiff
path: root/watch.go
diff options
context:
space:
mode:
authorPhilipp Tanlak <philipp.tanlak@gmail.com>2023-11-18 22:49:26 +0100
committerGitHub <noreply@github.com>2023-11-18 22:49:26 +0100
commit6aa52bdbe2cefdbc9219abfb4399afa0d492913d (patch)
tree02c743b7d9393dbf024e14adada73c6594bdd34a /watch.go
parent94da9293f63e46712b0a890e1e0eab4153fdb3f9 (diff)
Support passing config options as CLI arguments (#15)
Diffstat (limited to 'watch.go')
-rw-r--r--watch.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/watch.go b/watch.go
index fb34bf5..711f7dd 100644
--- a/watch.go
+++ b/watch.go
@@ -58,14 +58,14 @@ func Watch(path string, fn func(string) error) error {
if errors.Is(err, StopWatch) {
return nil
}
- return err
+ return nil
}
case err, ok := <-watcher.Errors:
if !ok {
return nil
}
if err != nil {
- return err
+ return fmt.Errorf("watcher: %w", err)
}
}
}