diff options
Diffstat (limited to 'vendor/github.com/urfave/cli/flag_string_slice.go')
-rw-r--r-- | vendor/github.com/urfave/cli/flag_string_slice.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vendor/github.com/urfave/cli/flag_string_slice.go b/vendor/github.com/urfave/cli/flag_string_slice.go index c6cb442545..a7c71e9dcc 100644 --- a/vendor/github.com/urfave/cli/flag_string_slice.go +++ b/vendor/github.com/urfave/cli/flag_string_slice.go @@ -156,7 +156,9 @@ func lookupStringSlice(name string, set *flag.FlagSet) []string { func removeFromStringSlice(slice []string, val string) []string { for i, v := range slice { if v == val { - return append(slice[:i], slice[i+1:]...) + ret := append([]string{}, slice[:i]...) + ret = append(ret, slice[i+1:]...) + return ret } } return slice |