Simple S3-like server for development purposes, written in Go
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Rename method for clarity

+2 -2
+1 -1
gos3dir.go
··· 52 52 http.HandleFunc("GET /{$}", srv.ls) 53 53 http.HandleFunc("GET /{bucket}", srv.ls) 54 54 http.HandleFunc("PUT /{bucket}", srv.mb) 55 - http.HandleFunc("PUT /{bucket}/{key...}", srv.cp) 55 + http.HandleFunc("PUT /{bucket}/{key...}", srv.cpPut) 56 56 http.HandleFunc("DELETE /{bucket}", srv.rb) 57 57 http.HandleFunc("DELETE /{bucket}/{key...}", srv.rm) 58 58
+1 -1
server.go
··· 172 172 w.WriteHeader(http.StatusOK) 173 173 } 174 174 175 - func (s *server) cp(w http.ResponseWriter, r *http.Request) { 175 + func (s *server) cpPut(w http.ResponseWriter, r *http.Request) { 176 176 root, err := os.OpenRoot(s.rootDir) 177 177 if err != nil { 178 178 http.Error(w, err.Error(), http.StatusInternalServerError)