14 lines
230 B
Go
14 lines
230 B
Go
|
package routes
|
||
|
|
||
|
import (
|
||
|
"log"
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
func Logger(handler http.Handler) http.HandlerFunc {
|
||
|
return func(res http.ResponseWriter, req *http.Request) {
|
||
|
log.Printf("%-80s", req.URL.Path)
|
||
|
handler.ServeHTTP(res, req)
|
||
|
}
|
||
|
}
|