This commit is contained in:
thinkerou 2019-02-21 15:03:52 +08:00
parent 2cc4ae26d3
commit 3e3342598c

View File

@ -83,6 +83,7 @@ func mapFormByTag(ptr interface{}, form map[string][]string, tag string) error {
} }
} }
val.Field(i).Set(slice) val.Field(i).Set(slice)
continue
} else if structFieldKind == reflect.Map { } else if structFieldKind == reflect.Map {
m := make(map[string]interface{}) m := make(map[string]interface{})
err := json.Unmarshal([]byte(inputValue[0]), &m) 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) val.Field(i).Set(structField)
continue
} else { } else {
if _, isTime := structField.Interface().(time.Time); isTime { if _, isTime := structField.Interface().(time.Time); isTime {
if err := setTimeField(inputValue[0], typeField, structField); err != nil { if err := setTimeField(inputValue[0], typeField, structField); err != nil {