Simplify if block -- reduce nesting
This commit is contained in:
parent
baad906d24
commit
0389a66cb9
@ -377,10 +377,11 @@ func reloadHooks(hooksFilePath string) {
|
||||
log.Printf("attempting to reload hooks from %s\n", hooksFilePath)
|
||||
|
||||
err := hooksInFile.LoadFromFile(hooksFilePath)
|
||||
|
||||
if err != nil {
|
||||
log.Printf("couldn't load hooks from file! %+v\n", err)
|
||||
} else {
|
||||
return
|
||||
}
|
||||
|
||||
seenHooksIds := make(map[string]bool)
|
||||
|
||||
log.Printf("found %d hook(s) in file\n", len(hooksInFile))
|
||||
@ -406,7 +407,6 @@ func reloadHooks(hooksFilePath string) {
|
||||
}
|
||||
|
||||
loadedHooksFromFiles[hooksFilePath] = hooksInFile
|
||||
}
|
||||
}
|
||||
|
||||
func reloadAllHooks() {
|
||||
|
Loading…
Reference in New Issue
Block a user