-
Notifications
You must be signed in to change notification settings - Fork 32
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
Unknown number of positional arguments #79
Comments
Yep. It is supported to get TrailingArguments, as well as Positional Arguments... In your example, You can get |
So, i need to do something like: mycoolpackagemanager install -- coolpackage1 coolpackage2 coolpackageN ? |
I had no problems with getopt-long in C, and I was surprised to notice that with all sorts of unnecessary bloat libraries, there is no "perfect" argument parser in go. |
The binary for go is bigger, but the go runtime contains a ton of good stuff for concurrency, garbage collection, and thread handling... I actually just tested this because I wasn't 100% sure anymore, and noticed bad behavior wherein trailing arguments were not set as I would have expected them to be... Checking it out when I get a moment. |
Fixed in tag v1.5.2!
|
Thanks! |
A simple example:
mycoolpackagemanager install pkg1 pkg2 pkg3 ... pkgN
Is this supported? I didn't find anything about this
The text was updated successfully, but these errors were encountered: