etcd/server/v1/delete_key_handler.go
Tomás Senart b6053d6a86 Making code formatting consistent.
$ gofmt -s -w  && goimports -w
2014-03-27 14:19:08 +01:00

16 lines
366 B
Go

package v1
import (
"net/http"
"github.com/coreos/etcd/third_party/github.com/gorilla/mux"
)
// Removes a key from the store.
func DeleteKeyHandler(w http.ResponseWriter, req *http.Request, s Server) error {
vars := mux.Vars(req)
key := "/" + vars["key"]
c := s.Store().CommandFactory().CreateDeleteCommand(key, false, false)
return s.Dispatch(c, w, req)
}