mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
able to get root dir
This commit is contained in:
parent
4c70b0738a
commit
73233798a9
@ -124,6 +124,11 @@ func (t *tree) set(key string, value Node) bool {
|
||||
func (t *tree) internalGet(key string) (*treeNode, bool) {
|
||||
nodesName := split(key)
|
||||
|
||||
// should be able to get root
|
||||
if len(nodesName) == 1 && nodesName[0] == "" {
|
||||
return t.Root, true
|
||||
}
|
||||
|
||||
nodeMap := t.Root.NodeMap
|
||||
|
||||
var i int
|
||||
|
Loading…
x
Reference in New Issue
Block a user