improved debug outputs
This commit is contained in:
parent
8f54b4d4bf
commit
d4c590f2ec
2
main.go
2
main.go
@ -84,7 +84,7 @@ func print_children(heading *heading, headings []heading) {
|
|||||||
func print_children_recursive(heading *heading, headings []heading) {
|
func print_children_recursive(heading *heading, headings []heading) {
|
||||||
for index, _ := range headings {
|
for index, _ := range headings {
|
||||||
if headings[index].parent == heading {
|
if headings[index].parent == heading {
|
||||||
fmt.Printf("Child of parent %p: %s\n", heading, headings[index].text)
|
fmt.Printf("Child of parent %p: %s (%p)\n", heading, headings[index].text, &headings[index])
|
||||||
print_children_recursive(&headings[index], headings)
|
print_children_recursive(&headings[index], headings)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user