mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-21 16:58:08 +08:00
fix bug
This commit is contained in:
parent
2cc4ae26d3
commit
3e3342598c
@ -83,6 +83,7 @@ func mapFormByTag(ptr interface{}, form map[string][]string, tag string) error {
|
||||
}
|
||||
}
|
||||
val.Field(i).Set(slice)
|
||||
continue
|
||||
} else if structFieldKind == reflect.Map {
|
||||
m := make(map[string]interface{})
|
||||
err := json.Unmarshal([]byte(inputValue[0]), &m)
|
||||
@ -97,6 +98,7 @@ func mapFormByTag(ptr interface{}, form map[string][]string, tag string) error {
|
||||
}
|
||||
|
||||
val.Field(i).Set(structField)
|
||||
continue
|
||||
} else {
|
||||
if _, isTime := structField.Interface().(time.Time); isTime {
|
||||
if err := setTimeField(inputValue[0], typeField, structField); err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user