From 8a575eac1897988631620821d092f0dfbfa90491 Mon Sep 17 00:00:00 2001 From: Denis Zheleztsov Date: Thu, 4 May 2017 16:44:22 +0300 Subject: [PATCH] return chrooted path in RMR instead of full node path --- rest/api.go | 2 +- rest/zoo.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rest/api.go b/rest/api.go index 2f803af..914c06b 100644 --- a/rest/api.go +++ b/rest/api.go @@ -131,7 +131,7 @@ func (zk ZooNode) RM(w http.ResponseWriter, r *http.Request) { go func() { zk.RMR(rmPath) }() w.WriteHeader(200) - w.Write([]byte(rmPath)) + w.Write([]byte(path)) } // GET ... diff --git a/rest/zoo.go b/rest/zoo.go index fb8bd22..1dc21ab 100644 --- a/rest/zoo.go +++ b/rest/zoo.go @@ -31,7 +31,7 @@ func (conf Zk) InitConnection() (*zk.Conn, error) { return conn, err } -// GetChildrens ... +// GetChildrens get Zookeeper node childrens func (z ZooNode) GetChildrens(path string) Ls { var lsPath string lsPath = strings.Join([]string{z.Path, path}, "")