Correct flag help

This commit is contained in:
Jan Eitzinger 2023-05-09 09:33:51 +02:00
parent d3107dd2cc
commit 09d30d0ead

View File

@ -219,7 +219,7 @@ func deepCopyClusterConfig(co *Cluster) schema.Cluster {
mcn.Name = mco.Name mcn.Name = mco.Name
mcn.Scope = mco.Scope mcn.Scope = mco.Scope
if mco.Aggregation == "" { if mco.Aggregation == "" {
fmt.Println("Property aggregation missing! Please review file!") fmt.Println("cluster.json - Property aggregation missing! Please review file!")
mcn.Aggregation = "sum" mcn.Aggregation = "sum"
} else { } else {
mcn.Aggregation = mco.Aggregation mcn.Aggregation = mco.Aggregation
@ -252,8 +252,8 @@ func main() {
flag.BoolVar(&flagLogDateTime, "logdate", false, "Set this flag to add date and time to log messages") flag.BoolVar(&flagLogDateTime, "logdate", false, "Set this flag to add date and time to log messages")
flag.StringVar(&flagLogLevel, "loglevel", "warn", "Sets the logging level: `[debug,info,warn (default),err,fatal,crit]`") flag.StringVar(&flagLogLevel, "loglevel", "warn", "Sets the logging level: `[debug,info,warn (default),err,fatal,crit]`")
flag.StringVar(&flagConfigFile, "config", "./config.json", "Specify alternative path to `config.json`") flag.StringVar(&flagConfigFile, "config", "./config.json", "Specify alternative path to `config.json`")
flag.StringVar(&srcPath, "s", "./var/job-archive", "Specify the source job archive path. Default is ./var/job-archive") flag.StringVar(&srcPath, "s", "./var/job-archive", "Specify the source job archive path")
flag.StringVar(&dstPath, "d", "./var/job-archive-new", "Specify the destination job archive path. Default is ./var/job-archive-new") flag.StringVar(&dstPath, "d", "./var/job-archive-new", "Specify the destination job archive path")
flag.Parse() flag.Parse()
if _, err := os.Stat(filepath.Join(srcPath, "version.txt")); !errors.Is(err, os.ErrNotExist) { if _, err := os.Stat(filepath.Join(srcPath, "version.txt")); !errors.Is(err, os.ErrNotExist) {