From 1128a10561b98f74b8c48d56a8129c597b8aec7f Mon Sep 17 00:00:00 2001 From: Tordarus Date: Fri, 14 Jan 2022 16:55:11 +0100 Subject: [PATCH] debug log --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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())) }