🎉 initial commit

This commit is contained in:
2021-01-13 23:39:00 +01:00
commit 8e9cbe797c
9 changed files with 161 additions and 0 deletions

14
middleware.go Normal file
View 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)
}
}