etcdserver/api/v2store/node.go
func (n *node) GetChild(name string) (*node, *v2error.Error) {
	if !n.IsDir() {
		return nil, v2error.NewError(v2error.EcodeNotDir, n.Path, n.store.CurrentIndex)
	}

	child, ok := n.Children[name]

	if ok {
		return child, nil
	}

	return nil, nil
}
func (n *node) GetChild(name string) (*node, *v2error.Error) {
	if !n.IsDir() {
		return nil, v2error.NewError(v2error.EcodeNotDir, n.Path, n.store.CurrentIndex)
	}

	child, ok := n.Children[name]

	if ok {
		return child, nil
	}

	return nil, nil
}
func ( n * node ) GetChild ( name string ) ( * node , * v2error . Error ) { if ! n . IsDir ( ) { return nil , v2error . NewError ( v2error . EcodeNotDir , n . Path , n . store . CurrentIndex ) } child , ok := n . Children [ name ] if ok { return child , nil } return nil , nil }
// GetChild function returns the child node under the directory node.
// On success, it returns the file node
GetChild function returns the child node under the directory node . On success it returns the file node