diff options
| author | Jeff Carr <[email protected]> | 2021-10-09 03:04:15 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2021-10-09 03:04:15 -0500 |
| commit | 77d6d6d24e7574c49d6c578ac39f5410817abeaf (patch) | |
| tree | e047c532fd1bf1f3393bd946c7212ad3e8b33377 /new-structs.go | |
| parent | 6630fe037016967cc0b246086077b0523da6d521 (diff) | |
NODE: walking around in the rabbit hole
Diffstat (limited to 'new-structs.go')
| -rw-r--r-- | new-structs.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/new-structs.go b/new-structs.go index 4c24692..d5aa2fb 100644 --- a/new-structs.go +++ b/new-structs.go @@ -102,14 +102,16 @@ func (n *Node) List() { func (n *Node) ListChildren(dump bool) { log.Println("\tListChildren() node =", n.id, n.Name, n.Width, n.Height) + if (dump == true) { + n.Dump() + } if len(n.children) == 0 { if (n.parent != nil) { log.Println("\t\t\tparent =",n.parent.id) } - log.Println("\t\tNo children START") + log.Println("\t\t", n.id, "has no children") return } - // spew.Dump(n) for _, child := range n.children { log.Println("\t\tListChildren() child =",child.id, child.Name, child.Width, child.Height) if (child.parent != nil) { @@ -118,12 +120,14 @@ func (n *Node) ListChildren(dump bool) { log.Println("\t\t\tno parent") panic("no parent") } + /* if (dump == true) { child.Dump() } + */ if (child.children == nil) { - log.Println("\t\t\tNo children END") - // break + log.Println("\t\t", child.id, "has no children") + break } log.Println("\t\t\tHas children:", child.children) child.ListChildren(dump) |
