diff --git a/main.go b/main.go index 03fc144..6e5ffd5 100644 --- a/main.go +++ b/main.go @@ -7,6 +7,7 @@ import ( "fmt" "io" "io/fs" + "log" "net/http" "net/url" "os" @@ -44,6 +45,7 @@ func main() { } func handler(w http.ResponseWriter, r *http.Request) { + log.Println(r.Method, getPath(r.URL.Path, r)) switch r.Method { case "GET": get(w, r) @@ -86,8 +88,6 @@ func get(w http.ResponseWriter, r *http.Request) { return } - fmt.Println(path, files) - for _, file := range files { fmt.Fprintln(w, url.QueryEscape(file.Name())) }