mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
16 lines
333 B
Go
16 lines
333 B
Go
package v1
|
|
|
|
import (
|
|
"net/http"
|
|
"github.com/coreos/etcd/store"
|
|
"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 := &store.DeleteCommand{Key: key}
|
|
return s.Dispatch(c, w, req)
|
|
}
|