debug log
This commit is contained in:
parent
8d8f041946
commit
1128a10561
4
main.go
4
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()))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user