mirror of
https://github.com/nxshock/gron.git
synced 2025-07-01 00:13:36 +05:00
Default config path = bin path + config name
This commit is contained in:
parent
2397f32bba
commit
96587792cc
2 changed files with 2 additions and 2 deletions
|
@ -31,7 +31,7 @@ func initConfig() error {
|
||||||
return fmt.Errorf("Usage: %s [path to config]", filepath.Base(ex))
|
return fmt.Errorf("Usage: %s [path to config]", filepath.Base(ex))
|
||||||
}
|
}
|
||||||
|
|
||||||
configFilePath := defaultConfigFilePath
|
configFilePath := filepath.Join(filepath.Dir(ex), defaultConfigFileName)
|
||||||
if len(os.Args) == 2 {
|
if len(os.Args) == 2 {
|
||||||
configFilePath = os.Args[1]
|
configFilePath = os.Args[1]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
const (
|
const (
|
||||||
defaultConfigFilePath = "gron.conf"
|
defaultConfigFileName = "gron.conf"
|
||||||
|
|
||||||
defaultOnSuccessMessageFmt = "Job {{.JobName}} finished."
|
defaultOnSuccessMessageFmt = "Job {{.JobName}} finished."
|
||||||
defaultOnErrorMessageFmt = "Job {{.JobName}} failed:\n\n{{.Error}}"
|
defaultOnErrorMessageFmt = "Job {{.JobName}} failed:\n\n{{.Error}}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue