We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given a option with no default value:
package main import "github.com/jessevdk/go-flags" type opts struct { Value int `short:"v" description:"The value"` } func main() { var opts opts flags.Parse(&opts) }
Calling help with that option set will display a false default value:
$ go run main.go -v 7 -h Usage: main [OPTIONS] Application Options: -v= The value (7) Help Options: -h, --help Show this help message
This can lead to mistakes where users think there is a default value where there is none.
The text was updated successfully, but these errors were encountered:
The original reason for this was to cover this case:
opts := struct { Value int `short:"v" description:"The value"` } { Value: 5 } flags.Parse(&opts)
So the initial value would really be the current value. That said, it obviously doesn't work for your case.
Sorry, something went wrong.
1c008c1
Thanks!
No branches or pull requests
Given a option with no default value:
Calling help with that option set will display a false default value:
This can lead to mistakes where users think there is a default value where there is none.
The text was updated successfully, but these errors were encountered: