Skip to content

Commit

Permalink
Fix bug in slice type conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
ghjm committed Jan 20, 2021
1 parent 24d547e commit 88307c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cmdline/cmdline.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ func setValue(field *reflect.Value, value interface{}) error {
if !item.Type().ConvertibleTo(fieldType.Elem()) {
return fmt.Errorf("invalid value %s: must be type %s", item, fieldType.Elem())
}
reflect.Append(fieldSlice, item.Convert(fieldType.Elem()))
fieldSlice = reflect.Append(fieldSlice, item.Convert(fieldType.Elem()))
}
field.Set(fieldSlice)
return nil
Expand Down

0 comments on commit 88307c9

Please sign in to comment.