all repos — website @ 8606328379e7021a2e4bf0d56c0602fa595fa72e

My website

remove unnecessary assignments

Alan Pearce
commit

8606328379e7021a2e4bf0d56c0602fa595fa72e

parent

8517cc3937c64dbe78f60a7b33b8c0ea1e8cb8e9

1 file changed, 2 insertions(+), 4 deletions(-)

changed files
M internal/server/logging.gointernal/server/logging.go
@@ -24,18 +24,16 @@ }
func wrapHandlerWithLogging(wrappedHandler http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - host := r.Host lw := NewLoggingResponseWriter(w) wrappedHandler.ServeHTTP(lw, r) if r.URL.Path == "/health" { return } - statusCode := lw.statusCode log.Info( "http request", "method", r.Method, - "status", statusCode, - "host", host, + "status", lw.statusCode, + "host", r.Host, "path", r.URL.Path, "location", lw.Header().Get("Location"), )