add comment

This commit is contained in:
guonaihong 2020-01-16 22:52:42 +08:00
parent 1e858d5bd7
commit 362376322e
1 changed files with 1 additions and 0 deletions

View File

@ -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)
}