fix special cases for duration flags
This commit is contained in:
parent
4fb6b2d66c
commit
857cd49040
1 changed files with 6 additions and 5 deletions
|
|
@ -47,14 +47,15 @@ func hasNonHelpFlags(fs *pflag.FlagSet) (found bool) {
|
|||
}
|
||||
|
||||
var hiddenFlagDefaults = map[string]bool{
|
||||
"false": true,
|
||||
"": true,
|
||||
"[]": true,
|
||||
"duration": true,
|
||||
"false": true,
|
||||
"": true,
|
||||
"[]": true,
|
||||
"0s": true,
|
||||
}
|
||||
|
||||
var defaultValFormats = map[string]string{
|
||||
"string": " (default \"%s\")",
|
||||
"string": " (default \"%s\")",
|
||||
"duration": " (default \"%s\")",
|
||||
}
|
||||
|
||||
func getDefaultValueDisplayString(f *pflag.Flag) string {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue