fix golint issues (#899)

This commit is contained in:
Kevin Wan
2021-08-11 11:38:55 +08:00
committed by GitHub
parent f204729482
commit e024aebb66

View File

@@ -518,7 +518,8 @@ func (u *Unmarshaler) fillSliceValue(slice reflect.Value, index int, baseKind re
target.Set(reflect.ValueOf(value)) target.Set(reflect.ValueOf(value))
ithVal.Set(target.Addr()) ithVal.Set(target.Addr())
return nil return nil
} else { }
if ithVal.Kind() != reflect.TypeOf(value).Kind() { if ithVal.Kind() != reflect.TypeOf(value).Kind() {
return errTypeMismatch return errTypeMismatch
} }
@@ -527,7 +528,6 @@ func (u *Unmarshaler) fillSliceValue(slice reflect.Value, index int, baseKind re
return nil return nil
} }
} }
}
func (u *Unmarshaler) generateMap(keyType, elemType reflect.Type, mapValue interface{}) (reflect.Value, error) { func (u *Unmarshaler) generateMap(keyType, elemType reflect.Type, mapValue interface{}) (reflect.Value, error) {
mapType := reflect.MapOf(keyType, elemType) mapType := reflect.MapOf(keyType, elemType)