don't add -- prefix if we manually specify one

This commit is contained in:
OneOfOne 2017-08-31 00:26:52 +02:00
parent 163f247519
commit b7ab5b0c48
No known key found for this signature in database
GPG Key ID: F3A4E8B6760B7805

View File

@ -778,7 +778,7 @@ func visibleFlags(fl []Flag) []Flag {
func prefixFor(name string) (prefix string) { func prefixFor(name string) (prefix string) {
if len(name) == 1 { if len(name) == 1 {
prefix = "-" prefix = "-"
} else { } else if name[0] != '-' {
prefix = "--" prefix = "--"
} }