elideShortChildren takes a number of entries to set `elideShort` to false. The reason a number of entries is needed is that we may be eliding a subtree of causes in the case of a multi-cause error. In the multi-cause case, we need to know how many of the prior errors in the list of entries is a chil
(newEntries int)
| 507 | // the multi-cause case, we need to know how many of the prior errors |
| 508 | // in the list of entries is a child of this subtree. |
| 509 | func (s *state) elideShortChildren(newEntries int) { |
| 510 | for i := 0; i < newEntries; i++ { |
| 511 | s.entries[len(s.entries)-1-i].elideShort = true |
| 512 | } |
| 513 | } |
| 514 | |
| 515 | func (s *state) collectEntry(err error, bufIsRedactable bool, withDepth bool, depth int) formatEntry { |
| 516 | entry := formatEntry{err: err} |