fix help generation; update README

This commit is contained in:
Ben Paxton 2019-03-13 17:24:36 +00:00 committed by Isaev Denis
parent c41b1e2034
commit f13d8387d3
2 changed files with 11 additions and 10 deletions

View File

@ -503,6 +503,7 @@ Flags:
-h, --help help for run
Global Flags:
--color string Use color when printing; can be 'always', 'auto', or 'never' (default "auto")
-j, --concurrency int Concurrency (default NumCPU) (default 8)
--cpu-profile-path string Path to CPU profile output file
--mem-profile-path string Path to memory profile output file

View File

@ -52,17 +52,17 @@ func NewExecutor(version, commit, date string) *Executor {
}
if commandLineCfg != nil {
logutils.SetupVerboseLog(e.log, commandLineCfg.Run.IsVerbose)
}
switch commandLineCfg.Output.Color {
case "always":
color.NoColor = false
case "never":
color.NoColor = true
case "auto":
// nothing
default:
e.log.Fatalf("invalid value %q for --color; must be 'always', 'auto', or 'never'", commandLineCfg.Output.Color)
switch commandLineCfg.Output.Color {
case "always":
color.NoColor = false
case "never":
color.NoColor = true
case "auto":
// nothing
default:
e.log.Fatalf("invalid value %q for --color; must be 'always', 'auto', or 'never'", commandLineCfg.Output.Color)
}
}
// init of commands must be done before config file reading because