package main import ( "log" "net/http" ) func uploader(w http.ResponseWriter, r *http.Request) { if verbose { log.Printf("%s: <%s> %s %s %s", r.Host, r.RemoteAddr, r.Method, r.RequestURI, r.Proto) } switch r.Method { case "DELETE": uploaderDelete(w, r) case "POST": uploaderPost(w, r) case "PUT": uploaderPut(w, r) case "GET": uploaderGet(w, r) } }