在help中新增编译参数信息

This commit is contained in:
orgin
2022-04-13 11:36:20 +08:00
parent 0f890887f7
commit f02592d126
2 changed files with 8 additions and 40 deletions

View File

@@ -54,7 +54,12 @@ func usage(val interface{}) error{
return nil
}
fmt.Fprintf(os.Stderr, "Welcome to Origin(build time: %s)\nUsage: originserver [-help] [-start node=1] [-stop] [-config path] [-pprof 0.0.0.0:6060]...\n",buildtime.GetBuildDateTime())
if len(buildtime.GetBuildDateTime())>0 {
fmt.Fprintf(os.Stderr, "Welcome to Origin(build info: %s)\nUsage: originserver [-help] [-start node=1] [-stop] [-config path] [-pprof 0.0.0.0:6060]...\n",buildtime.GetBuildDateTime())
}else{
fmt.Fprintf(os.Stderr, "Welcome to Origin\nUsage: originserver [-help] [-start node=1] [-stop] [-config path] [-pprof 0.0.0.0:6060]...\n")
}
console.PrintDefaults()
return nil
}