aboutsummaryrefslogtreecommitdiff
path: root/plugin/file/tree/print.go
diff options
context:
space:
mode:
authorGravatar xuweiwei <xuweiwei_yewu@cmss.chinamobile.com> 2021-11-20 00:18:31 +0800
committerGravatar GitHub <noreply@github.com> 2021-11-19 16:18:31 +0000
commite799a0f5c7ae90b6db3b9f63e2d82765b30200e6 (patch)
tree8f2d2015340cecac37d883f87478a40feabc0a4e /plugin/file/tree/print.go
parent5f900b86f5575ce2be8450057c03ba6f65236f4d (diff)
downloadcoredns-e799a0f5c7ae90b6db3b9f63e2d82765b30200e6.tar.gz
coredns-e799a0f5c7ae90b6db3b9f63e2d82765b30200e6.tar.zst
coredns-e799a0f5c7ae90b6db3b9f63e2d82765b30200e6.zip
plugin/file: Fix print tree error (#4962)
Automatically submitted.
Diffstat (limited to 'plugin/file/tree/print.go')
-rw-r--r--plugin/file/tree/print.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/file/tree/print.go b/plugin/file/tree/print.go
index bd86ef690..b2df70e1b 100644
--- a/plugin/file/tree/print.go
+++ b/plugin/file/tree/print.go
@@ -29,9 +29,9 @@ func (n *Node) print() {
}
if nodesInCurrentLevel == 0 {
fmt.Println()
+ nodesInCurrentLevel = nodesInNextLevel
+ nodesInNextLevel = 0
}
- nodesInCurrentLevel = nodesInNextLevel
- nodesInNextLevel = 0
}
fmt.Println()
}