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
limit possible values for parameters + required vs optional parameters #620
Comments
Hi @jeroenjacobs1205!
Thank you for your interest! Just let me know if any of this is unclear. I'll mark this as an enhancement with regard to the flag value restriction. |
Given that this is from last year, I think I'm comfortable closing it 🙂 feel free to re-open / open a new issue / comment in support if there's still interest here! |
/reopen /open /re-open |
@abdennour I re-opened and pinned #1154 (so it won't go stale), let me know if there's anything from this issue that warrants re-opening in addition. |
Thank you @rliebz ! should this answer #602 (comment) cover this issue ? |
I think so, seems pretty straightforward. |
Hi,
I'm going to be honest, I'm a newbie at Go development and I mostly used Python + its argparse module for my commandline tools.
I've been going through the documentation, but I'm struggling with a few concepts:
How can I limit a certain commandline parameter to certain values? Eg: I have a commandline parameter "--type" which can only accept the following values: picture,sound or video. so "--type=video" would be valid, but "--type=program" will not. Is there a way to specify these constraints? Python's argparse module can solve this with the "choices" option.
How can I dictate a certain commandline should always be specified? Eg: "--type" should always be specified, with a value.
The text was updated successfully, but these errors were encountered: