Update dangling IntSlice literal

This commit is contained in:
Dan Buch 2016-04-05 22:40:12 -04:00
parent cb433e7468
commit 7a5bfc850d

View File

@ -258,7 +258,7 @@ func (f IntSliceFlag) Apply(set *flag.FlagSet) {
for _, envVar := range strings.Split(f.EnvVar, ",") {
envVar = strings.TrimSpace(envVar)
if envVal := os.Getenv(envVar); envVal != "" {
newVal := &IntSlice{}
newVal := NewIntSlice()
for _, s := range strings.Split(envVal, ",") {
s = strings.TrimSpace(s)
err := newVal.Set(s)