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