guichet/views/http.go

19 lines
345 B
Go
Raw Normal View History

2023-12-09 17:23:06 +00:00
/*
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)
})
}