Skip to content

Commit db01ba8

Browse files
committed
core/err: optionally unjoin errMult
1 parent 0688e35 commit db01ba8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

intra/core/err.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,18 @@ func joinErr(uniq bool, errs ...error) error {
4343
var all []error
4444
var m map[error]struct{}
4545

46+
if false { // unjoin?
47+
for _, err := range errs {
48+
if err == nil {
49+
continue
50+
}
51+
var merr *errMult
52+
if errors.As(err, &merr) {
53+
all = append(all, merr.Unwrap()...)
54+
}
55+
}
56+
}
57+
4658
if uniq {
4759
m = make(map[error]struct{}, len(errs))
4860
}

0 commit comments

Comments
 (0)