Format pretty-prints the spans.
(tp treeprinter.Node, label string, redactable bool)
| 139 | |
| 140 | // Format pretty-prints the spans. |
| 141 | func (is Spans) Format(tp treeprinter.Node, label string, redactable bool) { |
| 142 | if len(is) == 0 { |
| 143 | tp.Childf("%s: empty", label) |
| 144 | return |
| 145 | } |
| 146 | if len(is) == 1 { |
| 147 | tp.Childf("%s: %s", label, formatSpan(is[0], redactable)) |
| 148 | return |
| 149 | } |
| 150 | n := tp.Child(label) |
| 151 | for i := 0; i < len(is); i++ { |
| 152 | n.Child(formatSpan(is[i], redactable)) |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | func formatSpan(span Span, redactable bool) string { |
| 157 | spanEndOpenOrClosed := ')' |
nothing calls this directly
no test coverage detected