(req *http.Request, obj any)
| 31 | } |
| 32 | |
| 33 | func (jsonBinding) Bind(req *http.Request, obj any) error { |
| 34 | if req == nil || req.Body == nil { |
| 35 | return errors.New("invalid request") |
| 36 | } |
| 37 | return decodeJSON(req.Body, obj) |
| 38 | } |
| 39 | |
| 40 | func (jsonBinding) BindBody(body []byte, obj any) error { |
| 41 | return decodeJSON(bytes.NewReader(body), obj) |
nothing calls this directly
no test coverage detected