1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-06-15 00:15:00 +02:00

Refactor SignInMessage out of main

This commit is contained in:
Nick Meves
2020-07-20 21:01:54 -07:00
parent 46cc21d8cf
commit e88d29f16a
3 changed files with 21 additions and 17 deletions

View File

@ -44,7 +44,7 @@ func WatchForUpdates(filename string, done <-chan bool, action func()) {
defer func(w *fsnotify.Watcher) {
cerr := w.Close()
if cerr != nil {
logger.Fatalf("error closing watcher: %s", err)
logger.Fatalf("error closing watcher: %v", err)
}
}(watcher)
for {
@ -62,7 +62,7 @@ func WatchForUpdates(filename string, done <-chan bool, action func()) {
logger.Printf("watching interrupted on event: %s", event)
err = watcher.Remove(filename)
if err != nil {
logger.Printf("error removing watcher on %s: %s", filename, err)
logger.Printf("error removing watcher on %s: %v", filename, err)
}
WaitForReplacement(filename, event.Op, watcher)
}