package middlewares import ( "log" "net/http" ) func Logger(handler http.Handler) http.HandlerFunc { return func(res http.ResponseWriter, req *http.Request) { log.Printf("%-30s %-80s", req.RemoteAddr, req.URL.Path) handler.ServeHTTP(res, req) } }