github.com/songzhibin97/gkit@v1.2.13/tools/bind/query.go (about)

     1  package bind
     2  
     3  import "net/http"
     4  
     5  type queryBinding struct{}
     6  
     7  func (queryBinding) Name() string {
     8  	return "query"
     9  }
    10  
    11  func (queryBinding) Bind(req *http.Request, obj interface{}) error {
    12  	values := req.URL.Query()
    13  	return mapForm(obj, values)
    14  }