writeTree writes the tree to the writer. path is a slice of indexes leading to the current node in the tree.
(t traceTree, path []int)
| 102 | // path is a slice of indexes leading to the current node |
| 103 | // in the tree. |
| 104 | func (p *treeWriter) writeTree(t traceTree, path []int) { |
| 105 | for i, child := range t.Children { |
| 106 | p.writeTree(child, append(path, i)) |
| 107 | } |
| 108 | |
| 109 | p.writeTrace(t.Err, t.Trace, path) |
| 110 | } |
| 111 | |
| 112 | func (p *treeWriter) writeTrace(err error, trace []runtime.Frame, path []int) { |
| 113 | // A trace for a single error takes |