Update dangling IntSlice literal
This commit is contained in:
parent
cb433e7468
commit
7a5bfc850d
2
flag.go
2
flag.go
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user