mirror of
https://github.com/grafana/grafana.git
synced 2026-08-18 17:15:08 -05:00
pkg/web: remove dependency injection (#49123)
* pkg/web: store http.Handler internally * pkg/web: remove injection Removes any injection code from pkg/web. It already was no longer functional, as we already only injected into `http.Handler`, meaning we only inject ctx.Req and ctx.Resp. Any other types (*Context, *ReqContext) were already accessed using the http.Request.Context.Value() method. * *: remove type mappings Removes any call to the previously removed TypeMapper, as those were non-functional already. * pkg/web: remove Context.Invoke was no longer used outside of pkg/web and also no longer functional
This commit is contained in:
@@ -103,9 +103,6 @@ func contextProvider(tc *testContext) web.Handler {
|
||||
SkipCache: true,
|
||||
Logger: log.New("test"),
|
||||
}
|
||||
c.Map(reqCtx)
|
||||
|
||||
c.Req = c.Req.WithContext(ctxkey.Set(c.Req.Context(), reqCtx))
|
||||
c.Map(c.Req)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user