don't add -- prefix if we manually specify one
This commit is contained in:
parent
163f247519
commit
b7ab5b0c48
2
flag.go
2
flag.go
@ -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 = "--"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user