Skip to content

Commit 160011c

Browse files
committed
remove unnecessary select
1 parent 6629d90 commit 160011c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

hosts.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,8 @@ func watchHostsChanges(filename string, fn func()) error {
7676
watcher.Add(filename)
7777

7878
for {
79-
select {
80-
case <-watcher.Events:
81-
fn()
82-
}
79+
<-watcher.Events
80+
fn()
8381
}
8482
}
8583

0 commit comments

Comments
 (0)