fix(middleware): define middleware in a more streamlined way

This commit is contained in:
2024-11-20 09:49:48 +01:00
committed by Tim Wundenberg
parent 003ccbe035
commit 9ab78b6cc8
5 changed files with 33 additions and 13 deletions

View File

@@ -30,7 +30,7 @@ func (w *WrappedWriter) WriteHeader(code int) {
w.StatusCode = code
}
func Logging(next http.Handler) http.Handler {
func Log(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
start := time.Now()