Merge pull request #48 from ryansb/stringsliceformat

string slice flag option formatting
This commit is contained in:
Jeremy Saenz 2013-12-02 20:08:33 -08:00
commit 41fe2d8682

View File

@ -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) {