how to default string flag to "auto"
#432
AlejandroSuero
started this conversation in
General
Replies: 2 comments 6 replies
|
If you don't included it it will default to |
5 replies
|
If anyone is wondering why this is the case, it's because it can easily be ambiguous. If you had a flag with a default that could be omitted, and you also had positional arguments, eg. Kong supports flag values via either
And even if Kong picks one of these, what will the users expectations be? |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I am working on a feature for freeze introducing a flag
--window.titlewhich if passed like--window.titleshould equal to--window.title=auto.When parsing the args from the command line like
kong.Parse(os.Args[1:])if I use the flag like./freeze cut.go --window.title, I get the following error:Is there a way to use a
stringwith the use case of--window.titleor if I just don't include it in the command line args it will just default toauto?All reactions