string slice flag option formatting
Used to output: ``` -- 'name' -name option -name option%!(EXTRA string=Usage text) ``` Now: ``` --name [] `-name option -name option` Usage text ```
This commit is contained in:
parent
a4d75ab69e
commit
28cf49a4ca
2
flag.go
2
flag.go
@ -54,7 +54,7 @@ type StringSliceFlag struct {
|
||||
}
|
||||
|
||||
func (f StringSliceFlag) String() string {
|
||||
return fmt.Sprintf("%s '%v'\t%v", prefixFor(f.Name), f.Name, "-"+f.Name+" option -"+f.Name+" option", f.Usage)
|
||||
return fmt.Sprintf("%s%s %v\t`%v` %s", prefixFor(f.Name), f.Name, f.Value, "-"+f.Name+" option -"+f.Name+" option", f.Usage)
|
||||
}
|
||||
|
||||
func (f StringSliceFlag) Apply(set *flag.FlagSet) {
|
||||
|
Loading…
Reference in New Issue
Block a user