guichet/views/http.go
2023-12-09 18:23:06 +01:00

18 lines
345 B
Go

/*
http-utils provide utility functions that interact with http
*/
package views
import (
"net/http"
)
func LogRequest(Handler http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// log.Printf("%s %s %s\n", r.RemoteAddr, r.Method, r.URL)
Handler.ServeHTTP(w, r)
})
}