mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-22 21:32:32 +00:00
Simplify boolean some comparisons
This commit is contained in:
parent
cfed5cfe4b
commit
48061f1508
2 changed files with 4 additions and 4 deletions
|
@ -120,7 +120,7 @@ func main() {
|
|||
|
||||
newHooksFiles := hooksFiles[:0]
|
||||
for _, filePath := range hooksFiles {
|
||||
if _, ok := loadedHooksFromFiles[filePath]; ok == true {
|
||||
if _, ok := loadedHooksFromFiles[filePath]; ok {
|
||||
newHooksFiles = append(newHooksFiles, filePath)
|
||||
}
|
||||
}
|
||||
|
@ -436,7 +436,7 @@ func reloadHooks(hooksFilePath string) {
|
|||
}
|
||||
}
|
||||
|
||||
if (matchLoadedHook(hook.ID) != nil && !wasHookIDAlreadyLoaded) || seenHooksIds[hook.ID] == true {
|
||||
if (matchLoadedHook(hook.ID) != nil && !wasHookIDAlreadyLoaded) || seenHooksIds[hook.ID] {
|
||||
log.Printf("error: hook with the id %s has already been loaded!\nplease check your hooks file for duplicate hooks ids!", hook.ID)
|
||||
log.Println("reverting hooks back to the previous configuration")
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue