summaryrefslogtreecommitdiff
path: root/watch.go
diff options
context:
space:
mode:
authorPhilipp Tanlak <philipp.tanlak@gmail.com>2024-02-07 23:20:55 +0100
committerGitHub <noreply@github.com>2024-02-07 23:20:55 +0100
commit0d6494d164cc490d62473eae0fbd79d5573bb380 (patch)
tree7a4586e89920b6abd4f6c7724f42634d66cf5f68 /watch.go
parent60139e7de275473332b560b4139a6a01c3da184c (diff)
Add retry module and change rate to requests per minute (#37)v0.7.0
Diffstat (limited to 'watch.go')
-rw-r--r--watch.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/watch.go b/watch.go
index 711f7dd..afeead4 100644
--- a/watch.go
+++ b/watch.go
@@ -42,16 +42,10 @@ func Watch(path string, fn func(string) error) error {
for {
select {
- case event, ok := <-watcher.Events:
+ case _, ok := <-watcher.Events:
if !ok {
return nil
}
- if event.Has(fsnotify.Remove) {
- continue
- }
- if event.Has(fsnotify.Chmod) {
- continue
- }
watcher.Remove(path)
watcher.Add(path)
if err := update(); err != nil {