cli icon indicating copy to clipboard operation
cli copied to clipboard

Support required options

Open prisoner opened this issue 7 years ago • 1 comments

Support required options.

prisoner avatar Dec 26 '17 02:12 prisoner

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).

osklyar avatar Dec 26 '17 17:12 osklyar