You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using flag module and your program is running with help -h we need the program print the default values of the options. The users need to know what are the parameters default values they will not provide.
If you run the above program it will print the default value of `param which is 34:
34
But if you run your program with -h the program prints the usage and exit:
MyApp 0.0.1
-----------------------------------------------
Usage: MyApp [options] [ARGS]
Description: My app is good
Options:
-p, --parameter My parameter
-h, --help display this help and exit
--version output version information and exit
The playground prints the above if you set the page above textfield Run arguments with -h.
The issue is that line -p, --parameter My parameterdoes not include (as Golang does) the default value of this parameter.
Describe the feature
When using
flag
module and your program is running with help-h
we need the program print the default values of the options. The users need to know what are the parameters default values they will not provide.Use Case
https://play.vlang.io/p/eec968e1a6
If you run the above program it will print the default value of `param which is 34:
But if you run your program with
-h
the program prints the usage and exit:The playground prints the above if you set the page above textfield Run arguments with
-h
.The issue is that line
-p, --parameter My parameter
does not include (as Golang does) the default value of this parameter.Proposed Solution
In the printout, changes lines like this:
into this:
Other Information
No response
Acknowledgements
Version used
V 0.4.8 e61475e
Environment details (OS name and version, etc.)
Playground
Huly®: V_0.6-21418
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: