Closed
Description
Issue Description
I think a valid use case of binding to a map[string]interface{}
now causes the following error: Binding element must be a struct
. I think the regression has been caused by #972.
Is this use case still valid ?
Checklist
- Dependencies installed
- No typos
- Searched existing issues and docs
Expected behaviour
Binding a map[string]interface{}
is valid.
Actual behaviour
Binding a map[string]interface{}
causes an error.
Code to debug
package main
func handler(c echo.Context) {
var m map[string]interface{}
if err := c.Bind(&m); err != nil {
// err is "Binding element must be a struct"
}
return nil
}