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

Support required options #1

Open
prisoner opened this issue Dec 26, 2017 · 1 comment
Open

Support required options #1

prisoner opened this issue Dec 26, 2017 · 1 comment

Comments

@prisoner
Copy link

Support required options.

@osklyar
Copy link
Contributor

osklyar commented Dec 26, 2017

If it was option combinations, that is having one implies another, I could then understand. Otherwise the meaning of the word option implies that it is not obligatory or that something else is the default. If you feel you need a required option why not define a sub-command or a sub-sub-command? In any case it is as trivial as _, defined := opts["option name"] to check if one was actually passed, so not sure it justifies an API change. Being required, or optional, is something that positional arguments can be (at the end of the definition).

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

No branches or pull requests

2 participants