forked from TrueCloudLab/certificates
Do not show value on boolean flags help.
This commit is contained in:
parent
dc657565a7
commit
00ebee870b
1 changed files with 5 additions and 1 deletions
|
@ -226,7 +226,11 @@ func stringifyFlag(f cli.Flag) string {
|
||||||
usage := fv.FieldByName("Usage").String()
|
usage := fv.FieldByName("Usage").String()
|
||||||
placeholder := placeholderString.FindString(usage)
|
placeholder := placeholderString.FindString(usage)
|
||||||
if placeholder == "" {
|
if placeholder == "" {
|
||||||
|
switch f.(type) {
|
||||||
|
case cli.BoolFlag, cli.BoolTFlag:
|
||||||
|
default:
|
||||||
placeholder = "<value>"
|
placeholder = "<value>"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return cli.FlagNamePrefixer(fv.FieldByName("Name").String(), placeholder) + "\t" + usage
|
return cli.FlagNamePrefixer(fv.FieldByName("Name").String(), placeholder) + "\t" + usage
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue