Skip to content

Commit

Permalink
Simplification of middleware example (#1423)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Michurin <a.michurin@gmail.com>
  • Loading branch information
michurin committed Jan 8, 2024
1 parent 6636d6a commit d9be404
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions examples/middleware/httpmiddleware/httpmiddleware.go
Expand Up @@ -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,
),
),
),
Expand Down

0 comments on commit d9be404

Please sign in to comment.