Skip to content

Commit

Permalink
Simplification of middleware example
Browse files Browse the repository at this point in the history
  • Loading branch information
michurin committed Jan 4, 2024
1 parent 046e320 commit 1b62fb4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions examples/middleware/httpmiddleware/httpmiddleware.go
Original file line number Diff line number Diff line change
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 1b62fb4

Please sign in to comment.