Conflicts:
	binding/binding.go
This commit is contained in:
Manu Mtz-Almeida
2015-05-24 03:33:21 +02:00
2 changed files with 19 additions and 4 deletions

View File

@ -20,6 +20,15 @@ func mapForm(ptr interface{}, form map[string][]string) error {
continue
}
// support for embeded fields
if structField.Kind() == reflect.Struct {
err := mapForm(structField.Addr().Interface(), form)
if err != nil {
return err
}
continue
}
inputFieldName := typeField.Tag.Get("form")
if inputFieldName == "" {
inputFieldName = typeField.Name