15 lines
194 B
Go
15 lines
194 B
Go
|
package middlewares
|
||
|
|
||
|
import (
|
||
|
"net/http"
|
||
|
|
||
|
"go.uber.org/zap"
|
||
|
)
|
||
|
|
||
|
func WithLogger(handler http.Handler, l *zap.SugaredLogger) http.Handler {
|
||
|
return &LoggerMiddleware{
|
||
|
l: l,
|
||
|
h: handler,
|
||
|
}
|
||
|
}
|