chore: archi package du projet

This commit is contained in:
Laurent Drogou
2021-04-13 14:09:58 +02:00
parent 7544643cfb
commit 8cdf1ca15f
9 changed files with 126 additions and 97 deletions

14
middleware/middleware.go Normal file
View File

@@ -0,0 +1,14 @@
package middleware
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)
}
}