Equals returns true if this Spans has the same spans as the given Spans, in the same order.
(other Spans)
| 126 | // Equals returns true if this Spans has the same spans as the given |
| 127 | // Spans, in the same order. |
| 128 | func (is Spans) Equals(other Spans) bool { |
| 129 | if len(is) != len(other) { |
| 130 | return false |
| 131 | } |
| 132 | for i := range is { |
| 133 | if !is[i].Equals(other[i]) { |
| 134 | return false |
| 135 | } |
| 136 | } |
| 137 | return true |
| 138 | } |
| 139 | |
| 140 | // Format pretty-prints the spans. |
| 141 | func (is Spans) Format(tp treeprinter.Node, label string, redactable bool) { |