From 2891214fac22630f02ae3e0b5bec1aa5b88e3a73 Mon Sep 17 00:00:00 2001 From: guonaihong Date: Thu, 16 Jan 2020 22:52:42 +0800 Subject: [PATCH] add comment --- binding/form_mapping.go | 1 + 1 file changed, 1 insertion(+) diff --git a/binding/form_mapping.go b/binding/form_mapping.go index 41f38b94..e76e7510 100644 --- a/binding/form_mapping.go +++ b/binding/form_mapping.go @@ -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) }