(handler http.Handler)
| 19 | } |
| 20 | |
| 21 | func (i RouteInjector) Wrap(handler http.Handler) http.Handler { |
| 22 | return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| 23 | routeName := getRouteName(i.RouteMatcher, r) |
| 24 | handler.ServeHTTP(w, WithRouteName(r, routeName)) |
| 25 | }) |
| 26 | } |
| 27 | |
| 28 | // WithRouteName annotates r's context with the provided route name. |
| 29 | // |
nothing calls this directly
no test coverage detected