-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double dash for keyword flags vs single dash for character flags #87
Comments
Hmm, this sounds like the correct way to do it. 👍 |
This is fairly standard in Unix, I think, but in Go it's very common to use a single dash for command line arguments, e.g. |
I know that the flags package accepts both -- and - for each given flag. I assume this is for practical reasons. Whether someone types --help or -help, the basic assumption is that the user wants see the help. Sent from my iPhone
|
We are at the mercy of the underlying |
I noticed that in some applications, character flags are grouped by a single hyphen, while keyword flags must be prepended with a double-hyphen.
For example:
myapp -asdf
Would be the equivalent to:
myapp -a -s -d -f
However,
myapp --asdf
Refers to the keyword flag 'asdf'
Is this something that may be considered for a later version?
The text was updated successfully, but these errors were encountered: