mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/httpserver: remove unnecessary http.HandlerFunc
wrapper in gzipHandler
This commit is contained in:
parent
1c9c57db1c
commit
cdf0a4cf8f
1 changed files with 1 additions and 2 deletions
|
@ -141,7 +141,7 @@ func Stop(addr string) error {
|
|||
}
|
||||
|
||||
func gzipHandler(rh RequestHandler) http.HandlerFunc {
|
||||
hf := func(w http.ResponseWriter, r *http.Request) {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
w = maybeGzipResponseWriter(w, r)
|
||||
handlerWrapper(w, r, rh)
|
||||
if zrw, ok := w.(*gzipResponseWriter); ok {
|
||||
|
@ -150,7 +150,6 @@ func gzipHandler(rh RequestHandler) http.HandlerFunc {
|
|||
}
|
||||
}
|
||||
}
|
||||
return http.HandlerFunc(hf)
|
||||
}
|
||||
|
||||
var metricsHandlerDuration = metrics.NewHistogram(`vm_http_request_duration_seconds{path="/metrics"}`)
|
||||
|
|
Loading…
Reference in a new issue