pflag
pflag copied to clipboard
Add hide default value in help/usage
Currently if you add a default value through NoOptDefVal
or DefValue
, it gets printed in the help/usage message.
fs.StringVarP(&cs.Password, "password", "p", "default", "the password for a remote user supplied by -u or --user.")
fs.Lookup("password").NoOptDefVal = "default"
results in
-p, --password string[="default"] the password for a remote user supplied by -u or --user. (default "default")
This field in the Flag type would omit the [="default"]
and (default "default")
additions.
#205
Hi, can this PR be merged? This issue is relevant for a project at my workplace and it would help alot. Thank you!