mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-12 00:24:45 +00:00
Use hooks.json as default file if no hooks file have been specified
This commit is contained in:
parent
8207c6cf12
commit
79453b7a22
1 changed files with 4 additions and 4 deletions
|
@ -70,15 +70,15 @@ func main() {
|
|||
|
||||
flag.Parse()
|
||||
|
||||
if len(hooksFiles) == 0 {
|
||||
log.Fatalln("you must specify at least one file to load hooks from")
|
||||
}
|
||||
|
||||
if *justDisplayVersion {
|
||||
fmt.Println("webhook version " + version)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
if len(hooksFiles) == 0 {
|
||||
hooksFiles = append(hooksFiles, "hooks.json")
|
||||
}
|
||||
|
||||
log.SetPrefix("[webhook] ")
|
||||
log.SetFlags(log.Ldate | log.Ltime)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue