Merge pull request #83 from penberg/string-slice-usage-text
Make StringSliceFlag usage text consistent
This commit is contained in:
commit
820deefc90
4
flag.go
4
flag.go
@ -59,7 +59,9 @@ type StringSliceFlag struct {
|
||||
}
|
||||
|
||||
func (f StringSliceFlag) String() string {
|
||||
return fmt.Sprintf("%s%s %v\t`%v` %s", prefixFor(f.Name), f.Name, f.Value, "-"+f.Name+" option -"+f.Name+" option", f.Usage)
|
||||
firstName := strings.Trim(strings.Split(f.Name, ",")[0], " ")
|
||||
pref := prefixFor(firstName)
|
||||
return fmt.Sprintf("%s '%v'\t%v", prefixedNames(f.Name), pref+firstName+" option "+pref+firstName+" option", f.Usage)
|
||||
}
|
||||
|
||||
func (f StringSliceFlag) Apply(set *flag.FlagSet) {
|
||||
|
Loading…
Reference in New Issue
Block a user