Allowing recursive node selection - e.g. when getting all nodes from a given namespace, or simply all nodes
This commit is contained in:
parent
672384faa8
commit
05fda09c14
1
node.go
1
node.go
|
@ -237,7 +237,6 @@ func (this *Node) SelectNodes(namespace, name string) []*Node {
|
|||
func rec_SelectNodes(cn *Node, namespace, name string, list *[]*Node) {
|
||||
if (namespace == "*" || cn.Name.Space == namespace) && (name == "*" || cn.Name.Local == name) {
|
||||
*list = append(*list, cn)
|
||||
return
|
||||
}
|
||||
|
||||
for _, v := range cn.Children {
|
||||
|
|
Loading…
Reference in New Issue