mirror of
https://github.com/gin-gonic/gin.git
synced 2025-12-11 19:47:00 +08:00
add comment
This commit is contained in:
parent
6341a255c1
commit
2891214fac
@ -300,6 +300,7 @@ func setByForm(value reflect.Value, field reflect.StructField, form map[string][
|
||||
}
|
||||
|
||||
func setWithProperType(val string, value reflect.Value, field reflect.StructField) error {
|
||||
// If it is a string type, no spaces are removed, and the user data is not modified here
|
||||
if value.Kind() != reflect.String {
|
||||
val = strings.TrimSpace(val)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user