-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Description
Lines 15 to 21 in b57163a
func (queryBinding) Bind(req *http.Request, obj any) error { | |
values := req.URL.Query() | |
if err := mapForm(obj, values); err != nil { | |
return err | |
} | |
return validate(obj) | |
} |
mapForm
searches form
struct tag, not query
Fixed version:
func (q queryBinding) Bind(req *http.Request, obj any) error {
values := req.URL.Query()
if err := mapFormByTag(obj, values, q.Name() ); err != nil {
return err
}
return validate(obj)
}
Metadata
Metadata
Assignees
Labels
No labels