换一个方式解决这种复杂的逻辑问题
This commit is contained in:
@@ -956,7 +956,7 @@ func outputfordebug(node *Node, prefix string, isTail bool, str *string) {
|
||||
if node.parent == nil {
|
||||
parentv = "nil"
|
||||
} else {
|
||||
parentv = spew.Sprint(node.key) + ":" + spew.Sprint(node.value)
|
||||
parentv = spew.Sprint(node.key) + ":" + spew.Sprint(node.parent.value)
|
||||
}
|
||||
suffix += parentv + "|" + spew.Sprint(node.size) + ")"
|
||||
*str += spew.Sprint(node.key) + ":" + spew.Sprint(node.value) + suffix + "\n"
|
||||
|
||||
Reference in New Issue
Block a user