how to default string flag to "auto"
#432
Replies: 2 comments 6 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? |
Beta Was this translation helpful? Give feedback.
-
|
If you don't included it it will default to |
Beta Was this translation helpful? Give feedback.
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?Beta Was this translation helpful? Give feedback.
All reactions