level returns the level of this node from the start of the tree
()
| 342 | |
| 343 | // level returns the level of this node from the start of the tree |
| 344 | func (n *TreeNode) level() int { |
| 345 | |
| 346 | level := 0 |
| 347 | parNode := n.parNode |
| 348 | for parNode != nil { |
| 349 | parNode = parNode.parNode |
| 350 | level++ |
| 351 | } |
| 352 | return level |
| 353 | } |
| 354 | |
| 355 | // applyStyles applies the specified style to this tree node |
| 356 | func (n *TreeNode) applyStyle(s *TreeNodeStyle) { |
no outgoing calls
no test coverage detected