summaryrefslogtreecommitdiff
path: root/new-structs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2021-10-25 06:46:49 -0500
committerJeff Carr <[email protected]>2021-10-25 06:46:49 -0500
commit9460526eadccf3f4a8f8eccdf6acbeaa6ca35bef (patch)
tree7ac867717d42d756a5df6d6298b1287e9c004550 /new-structs.go
parent24bd1fbda50920bff9de0f8808a10da98d8cf8a3 (diff)
REORG: move find() functions into find.go
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'new-structs.go')
-rw-r--r--new-structs.go38
1 files changed, 0 insertions, 38 deletions
diff --git a/new-structs.go b/new-structs.go
index d1ed875..7cd6d90 100644
--- a/new-structs.go
+++ b/new-structs.go
@@ -177,44 +177,6 @@ func (n *Node) ListChildren(dump bool) {
return
}
-func findByIdDFS(node *Node, id string) *Node {
- log.Println("findByIdDFS()", id, node)
- node.Dump()
- if node.id == id {
- log.Println("Found node id =", id, node)
- return node
- }
-
- if len(node.children) > 0 {
- for _, child := range node.children {
- newNode := findByIdDFS(child, id)
- if (newNode != nil) {
- return newNode
- }
- }
- }
- return nil
-}
-
-func findByName(node *Node, name string) *Node {
- log.Println("findByName()", name, node)
- node.Dump()
- if node.Name == name {
- log.Println("findByName() Found node name =", name, node)
- return node
- }
-
- if len(node.children) > 0 {
- for _, child := range node.children {
- newNode := findByName(child, name)
- if (newNode != nil) {
- return newNode
- }
- }
- }
- return nil
-}
-
// The parent Node needs to be the raw Window
// The 'stuff' Node needs to be the contents of the tab
//