()
| 117 | } |
| 118 | |
| 119 | func (a *API) needConfig() func(f interface{}) http.Handler { |
| 120 | if a.config == nil { |
| 121 | return func(f interface{}) http.Handler { |
| 122 | return alwaysError(errUnconfigured) |
| 123 | } |
| 124 | } |
| 125 | return jsonHandler |
| 126 | } |
| 127 | |
| 128 | // buildHandler adds the Core API routes to a preexisting http handler. |
| 129 | func (a *API) buildHandler() { |
no test coverage detected