summaryrefslogtreecommitdiff
path: root/new-structs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2021-10-09 02:37:14 -0500
committerJeff Carr <[email protected]>2021-10-09 02:37:14 -0500
commit6630fe037016967cc0b246086077b0523da6d521 (patch)
treea900b171f735d5c1091a46000e6ec89cb982e1ee /new-structs.go
parent3204eb151f4bd38854df22c91ab7c5f4ab06951e (diff)
NODE: walking around in the rabbit hole
Diffstat (limited to 'new-structs.go')
-rw-r--r--new-structs.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/new-structs.go b/new-structs.go
index d6e2550..4c24692 100644
--- a/new-structs.go
+++ b/new-structs.go
@@ -99,7 +99,7 @@ func (n *Node) List() {
findByIdDFS(n, "test")
}
-func (n *Node) ListChildren() {
+func (n *Node) ListChildren(dump bool) {
log.Println("\tListChildren() node =", n.id, n.Name, n.Width, n.Height)
if len(n.children) == 0 {
@@ -118,13 +118,15 @@ func (n *Node) ListChildren() {
log.Println("\t\t\tno parent")
panic("no parent")
}
- // child.Dump()
+ if (dump == true) {
+ child.Dump()
+ }
if (child.children == nil) {
log.Println("\t\t\tNo children END")
// break
}
log.Println("\t\t\tHas children:", child.children)
- child.ListChildren()
+ child.ListChildren(dump)
}
return
}