You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-07-01 01:04:59 +02:00
watcher: properly break out in nested blocks
Found via staticcheck: watcher.go:48:5: ineffective break statement. Did you mean to break out of the outer loop? (SA4011)
This commit is contained in:
@ -45,7 +45,7 @@ func WatchForUpdates(filename string, done <-chan bool, action func()) {
|
|||||||
select {
|
select {
|
||||||
case _ = <-done:
|
case _ = <-done:
|
||||||
log.Printf("Shutting down watcher for: %s", filename)
|
log.Printf("Shutting down watcher for: %s", filename)
|
||||||
break
|
return
|
||||||
case event := <-watcher.Events:
|
case event := <-watcher.Events:
|
||||||
// On Arch Linux, it appears Chmod events precede Remove events,
|
// On Arch Linux, it appears Chmod events precede Remove events,
|
||||||
// which causes a race between action() and the coming Remove event.
|
// which causes a race between action() and the coming Remove event.
|
||||||
|
Reference in New Issue
Block a user