From 939ba84c43c6c740bff027bd7eeb1b175a96fd46 Mon Sep 17 00:00:00 2001 From: ache Date: Sat, 17 Apr 2021 02:21:12 +0200 Subject: Log moving --- server.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'server.go') diff --git a/server.go b/server.go index 9b1cc1a..4bb2435 100644 --- a/server.go +++ b/server.go @@ -160,7 +160,9 @@ func handleGet( w http.ResponseWriter, r *http.Request, headOnly bool) { } name := "davy - " + filename err = tmpl.Execute(w, Collection{ name, cols, files}) - fmt.Println(err) + if err != nil { + fmt.Println(err) + } case stat.Mode().IsRegular(): if !headOnly { @@ -292,7 +294,7 @@ func handleOptions( w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK); } func handleCopy( w http.ResponseWriter, r *http.Request) { - fmt.Println("The body of the request isn't empty. It should be.") + fmt.Println(w, "The body of the request isn't empty. It should be.") } func handleMove( w http.ResponseWriter, r *http.Request) { filename := r.URL.Path[1:] @@ -304,6 +306,7 @@ func handleMove( w http.ResponseWriter, r *http.Request) { } if verifyEmptyBody(w, r) != nil { return } + fmt.Println("Moving ", filename, " => ", dest) fmt.Println(dest) return -- cgit v1.2.3