pflag
pflag copied to clipboard
StringSlice displays default even if "zeroed" DefValue
For multiline descriptions it looks very weird sometimes when (default ....)
section is placed at the end of paragraph. There is simple workaround - zero DefValue like this (cobra example): fooCmd.Flags().Lookup("foo-flag").DefValue = ""
. In most cases it will work and prevent (default ...)
part from being added at the end but it doesn't work for StringSlice
flag type and there would be something like this generated in usage text:
usage text (default )