This commit is contained in:
2025-04-01 17:57:35 +08:00
parent 7857015405
commit a5caa734c3
36 changed files with 1503 additions and 318 deletions

View File

@@ -0,0 +1,17 @@
package binding
import "net/http"
type queryBinding struct{}
func (queryBinding) Name() string {
return "query"
}
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)
}