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
Hi! Here's a small issue I came across:
var args struct { Param string }
./main --param A works ./main --param="-1h" works ./main --param "-1h" causes "error: missing value for -s"
./main --param A
./main --param="-1h"
./main --param "-1h"
Our CLI passes hour-differences this way and this used to work for us when using Go's flags, but unfortunately doesn't work with go-arg.
I understand that this is rather an edge case, but wanted to report it anyways.
Thanks for the great library!
The text was updated successfully, but these errors were encountered:
I'm experiencing this as well when trying to supply negative numbers as arguments and seeing the same error message.
Sorry, something went wrong.
@alexflint, would it make sense to drop these checks?
if !nextIsNumeric(spec.field.Type, args[i+1]) && isFlag(args[i+1]) { return fmt.Errorf("missing value for %s", arg) }
The only downside, I can think of, would be failed commands due to incorrect user input when a value is in fact forgotten.
No branches or pull requests
Hi!
Here's a small issue I came across:
./main --param A
works./main --param="-1h"
works./main --param "-1h"
causes "error: missing value for -s"Our CLI passes hour-differences this way and this used to work for us when using Go's flags, but unfortunately doesn't work with go-arg.
I understand that this is rather an edge case, but wanted to report it anyways.
Thanks for the great library!
The text was updated successfully, but these errors were encountered: