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,
|
||||
promhttp.InstrumentHandlerResponseSize(
|
||||
responseSize,
|
||||
http.HandlerFunc(func(writer http.ResponseWriter, r *http.Request) {
|
||||
handler.ServeHTTP(writer, r)
|
||||
}),
|
||||
handler,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue