docs(README): updated example
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Marvin Preuss 2022-01-14 13:55:05 +01:00
parent d095180eb4
commit 6dca2d6522

View File

@ -12,7 +12,8 @@ Just a simple zerolog based request logging http middleware. It also sets a `X-R
## Usage ## Usage
handler := logginghandler.Handler(http.HandlerFunc(myHandler)) logger := log.With().Logger()
handler := logginghandler.Handler(logger)(http.HandlerFunc(myHandler))
http.Handle("/", handler) http.Handle("/", handler)
log.Fatal().Msg(http.ListenAndServe(":5000", nil).Error()) log.Fatal().Msg(http.ListenAndServe(":5000", nil).Error())