JSONErrorResponse is a type-safe helper to avoid confusion around the provided argument.
(status int, err api.HTTPError)
| 185 | // JSONErrorResponse is a type-safe helper to avoid confusion around the |
| 186 | // provided argument. |
| 187 | func JSONErrorResponse(status int, err api.HTTPError) Responder { |
| 188 | return StatusJSONResponse(status, err) |
| 189 | } |
| 190 | |
| 191 | func FileResponse(filename string) Responder { |
| 192 | return func(req *http.Request) (*http.Response, error) { |