how to default string
flag to "auto"
#432
Replies: 2 comments 6 replies
-
If you don't included it it will default to |
Beta Was this translation helpful? Give feedback.
-
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.
-
I am working on a feature for freeze introducing a flag
--window.title
which if passed like--window.title
should 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
string
with the use case of--window.title
or 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