(f interface{})
| 394 | } |
| 395 | |
| 396 | func jsonHandler(f interface{}) http.Handler { |
| 397 | h, err := httpjson.Handler(f, errorFormatter.Write) |
| 398 | if err != nil { |
| 399 | panic(err) |
| 400 | } |
| 401 | return h |
| 402 | } |
| 403 | |
| 404 | func alwaysError(err error) http.Handler { |
| 405 | return jsonHandler(func() error { return err }) |
no outgoing calls
no test coverage detected