Skip to content

Commit 74b55a0

Browse files
committed
clean: simplify
1 parent 8d2ba22 commit 74b55a0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

middleware.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func RequestLogging(config *Config) func(http.Handler) http.Handler {
3737
// RequestLoggingWithEcho creates the middleware which logs a request log and creates a request-context logger
3838
func RequestLoggingWithEcho(config *Config) echo.MiddlewareFunc {
3939
return func(next echo.HandlerFunc) echo.HandlerFunc {
40-
fn := func(c echo.Context) error {
40+
return func(c echo.Context) error {
4141
reserve := NewReserve(config, c.Request())
4242

4343
wrw := &wrappedResponseWriter{
@@ -54,8 +54,6 @@ func RequestLoggingWithEcho(config *Config) echo.MiddlewareFunc {
5454

5555
return next(c)
5656
}
57-
58-
return fn
5957
}
6058
}
6159

0 commit comments

Comments
 (0)