mirror of https://github.com/gin-gonic/gin.git
add comment
This commit is contained in:
parent
1e858d5bd7
commit
362376322e
|
@ -170,6 +170,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…
Reference in New Issue