BindQuery binds the specified query value of a request.
(key string, v interface{})
| 40 | |
| 41 | // BindQuery binds the specified query value of a request. |
| 42 | func (c *Ctx) BindQuery(key string, v interface{}) error { |
| 43 | param := c.Query(key) |
| 44 | if param == "" { |
| 45 | return ErrValidation |
| 46 | } |
| 47 | |
| 48 | return bind(param, v) |
| 49 | } |
| 50 | |
| 51 | // Internal helper function to validate the bind |
| 52 | // requires the input in this case is the key of the param or query |