RouteInjector is a middleware that injects the route name for the current request into the request context. The route name can be retrieved by calling ExtractRouteName.
| 15 | // |
| 16 | // The route name can be retrieved by calling ExtractRouteName. |
| 17 | type RouteInjector struct { |
| 18 | RouteMatcher RouteMatcher |
| 19 | } |
| 20 | |
| 21 | func (i RouteInjector) Wrap(handler http.Handler) http.Handler { |
| 22 | return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
nothing calls this directly
no outgoing calls
no test coverage detected