query.go
This file
1// Copyright 2017 Manu Martinez-Almeida. All rights reserved.2// Use of this source code is governed by a MIT style3// license that can be found in the LICENSE file.45package binding67import "net/http"89type queryBinding struct{}1011func (queryBinding) Name() string {12 return "query"13}1415func (queryBinding) Bind(req *http.Request, obj any) error {16 values := req.URL.Query()17 if err := mapForm(obj, values); err != nil {18 return err19 }20 return validate(obj)21}