Do not show value on boolean flags help.

pull/85/head
Mariano Cano 5 years ago
parent dc657565a7
commit 00ebee870b

@ -226,7 +226,11 @@ func stringifyFlag(f cli.Flag) string {
usage := fv.FieldByName("Usage").String()
placeholder := placeholderString.FindString(usage)
if placeholder == "" {
placeholder = "<value>"
switch f.(type) {
case cli.BoolFlag, cli.BoolTFlag:
default:
placeholder = "<value>"
}
}
return cli.FlagNamePrefixer(fv.FieldByName("Name").String(), placeholder) + "\t" + usage
}

Loading…
Cancel
Save