mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
gofmt
This commit is contained in:
parent
09414016c2
commit
cd6ed3d15b
@ -169,7 +169,7 @@ func UpdateHttpHandler(w http.ResponseWriter, req *http.Request) error {
|
|||||||
// Delete Handler
|
// Delete Handler
|
||||||
func DeleteHttpHandler(w http.ResponseWriter, req *http.Request) error {
|
func DeleteHttpHandler(w http.ResponseWriter, req *http.Request) error {
|
||||||
key := req.URL.Path[len("/v2/keys"):]
|
key := req.URL.Path[len("/v2/keys"):]
|
||||||
|
|
||||||
debugf("recv.delete[%v] [%v%v]\n", req.RemoteAddr, req.Host, req.URL)
|
debugf("recv.delete[%v] [%v%v]\n", req.RemoteAddr, req.Host, req.URL)
|
||||||
|
|
||||||
command := &DeleteCommand{
|
command := &DeleteCommand{
|
||||||
|
@ -244,7 +244,7 @@ func (fs *FileSystem) Delete(nodePath string, recursive bool, index uint64, term
|
|||||||
}
|
}
|
||||||
|
|
||||||
fs.WatcherHub.notify(e)
|
fs.WatcherHub.notify(e)
|
||||||
|
|
||||||
return e, nil
|
return e, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ func (n *Node) Remove(recursive bool, callback func(path string)) error {
|
|||||||
|
|
||||||
if !n.IsDir() { // file node: key-value pair
|
if !n.IsDir() { // file node: key-value pair
|
||||||
_, name := path.Split(n.Path)
|
_, name := path.Split(n.Path)
|
||||||
|
|
||||||
if n.Parent != nil && n.Parent.Children[name] == n {
|
if n.Parent != nil && n.Parent.Children[name] == n {
|
||||||
// This is the only pointer to Node object
|
// This is the only pointer to Node object
|
||||||
// Handled by garbage collector
|
// Handled by garbage collector
|
||||||
|
Loading…
x
Reference in New Issue
Block a user