From 35ac968c9e1d4b82f46dbf9b42399f3049a5d8e5 Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Tue, 12 May 2015 17:08:05 -0700 Subject: [PATCH] upate string slice usage Signed-off-by: Victor Vieux --- flag.go | 2 +- flag_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flag.go b/flag.go index 2511586..bac044b 100644 --- a/flag.go +++ b/flag.go @@ -124,7 +124,7 @@ type StringSliceFlag struct { func (f StringSliceFlag) String() string { firstName := strings.Trim(strings.Split(f.Name, ",")[0], " ") pref := prefixFor(firstName) - return withEnvHint(f.EnvVar, fmt.Sprintf("%s [%v]\t%v", prefixedNames(f.Name), pref+firstName+" option "+pref+firstName+" option", f.Usage)) + return withEnvHint(f.EnvVar, fmt.Sprintf("%s [%v]\t%v", prefixedNames(f.Name), pref+firstName+" ...", f.Usage)) } func (f StringSliceFlag) Apply(set *flag.FlagSet) { diff --git a/flag_test.go b/flag_test.go index f0f096a..4c7fd5d 100644 --- a/flag_test.go +++ b/flag_test.go @@ -75,22 +75,22 @@ var stringSliceFlagTests = []struct { s := &cli.StringSlice{} s.Set("") return s - }(), "--help [--help option --help option]\t"}, + }(), "--help [--help ...]\t"}, {"h", func() *cli.StringSlice { s := &cli.StringSlice{} s.Set("") return s - }(), "-h [-h option -h option]\t"}, + }(), "-h [-h ...]\t"}, {"h", func() *cli.StringSlice { s := &cli.StringSlice{} s.Set("") return s - }(), "-h [-h option -h option]\t"}, + }(), "-h [-h ...]\t"}, {"test", func() *cli.StringSlice { s := &cli.StringSlice{} s.Set("Something") return s - }(), "--test [--test option --test option]\t"}, + }(), "--test [--test ...]\t"}, } func TestStringSliceFlagHelpOutput(t *testing.T) {