🎉 initial commit
This commit is contained in:
14
middleware.go
Normal file
14
middleware.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func logRequestMiddleware(next http.HandlerFunc) http.HandlerFunc {
|
||||
|
||||
return func(rw http.ResponseWriter, r *http.Request) {
|
||||
log.Printf("[%v] %v", r.Method, r.RequestURI)
|
||||
next.ServeHTTP(rw, r)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user