Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions libs/errs/aggregate.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
return aggregateErr
}

// Count returns the number of errors aggregated in err.
// Returns 0 if err was not created by FromMany.
func Count(err error) int {

Check failure on line 32 in libs/errs/aggregate.go

View workflow job for this annotation

GitHub Actions / lint

unreachable func: Count
if agg, ok := err.(*aggregateError); ok {
return len(agg.errors)
}
return 0
}

func (ce *aggregateError) Error() string {
var b []byte
for i, err := range ce.errors {
Expand Down
Loading