mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-24 02:32:17 +08:00
Merge 50ed42ef279d8b7c5773c19bbb2eeba9ffd90116 into 79478c0e805b7757f0e69390b72707f14373343b
This commit is contained in:
commit
328fe84a59
@ -97,8 +97,10 @@ func setWithProperType(valueKind reflect.Kind, val string, structField reflect.V
|
||||
return setFloatField(val, 64, structField)
|
||||
case reflect.String:
|
||||
structField.SetString(val)
|
||||
case reflect.Ptr:
|
||||
structField.Set(reflect.ValueOf(&val))
|
||||
default:
|
||||
return errors.New("Unknown type")
|
||||
return fmt.Errorf("Unknown type: %s", valueKind)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user