Skip to content
New issue

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

Arguments that start with '-' not parsed correctly #264

Open
reflog opened this issue Aug 14, 2024 · 0 comments
Open

Arguments that start with '-' not parsed correctly #264

reflog opened this issue Aug 14, 2024 · 0 comments

Comments

@reflog
Copy link

reflog commented Aug 14, 2024

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"

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant