Simplification of middleware example (#1423)
Signed-off-by: Alexey Michurin <a.michurin@gmail.com>
This commit is contained in:
parent
6636d6a23a
commit
d9be4042d3
|
@ -79,9 +79,7 @@ func (m *middleware) WrapHandler(handlerName string, handler http.Handler) http.
|
||||||
requestSize,
|
requestSize,
|
||||||
promhttp.InstrumentHandlerResponseSize(
|
promhttp.InstrumentHandlerResponseSize(
|
||||||
responseSize,
|
responseSize,
|
||||||
http.HandlerFunc(func(writer http.ResponseWriter, r *http.Request) {
|
handler,
|
||||||
handler.ServeHTTP(writer, r)
|
|
||||||
}),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue