Skip to content

Commit

Permalink
add flag to print version and exit
Browse files Browse the repository at this point in the history
  • Loading branch information
arriven committed Apr 10, 2022
1 parent fa3d25f commit e410ddf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func main() {
prometheusOn, prometheusPushGateways := metrics.NewOptionsWithFlags()
pprof := flag.String("pprof", utils.GetEnvStringDefault("GO_PPROF_ENDPOINT", ""), "enable pprof")
help := flag.Bool("h", false, "print help message and exit")
version := flag.Bool("version", false, "print version and exit")
debug := flag.Bool("debug", utils.GetEnvBoolDefault("DEBUG", false), "enable debug level logging")

flag.Parse()
Expand All @@ -66,6 +67,8 @@ func main() {
case *help:
flag.CommandLine.Usage()

return
case *version:
return
case *updaterMode:
config.UpdateLocal(*destinationPath, strings.Split(runnerConfigOptions.PathsCSV, ","), []byte(runnerConfigOptions.BackupConfig))
Expand Down

0 comments on commit e410ddf

Please sign in to comment.