Skip to content

Commit 1f2cf3c

Browse files
authored
Skipped nil errors in xerrors.Join(errs)
1 parent c53d595 commit 1f2cf3c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/xerrors/join.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ package xerrors
33
import (
44
"fmt"
55

6+
"github.com/ydb-platform/ydb-go-sdk/v3/internal/xslices"
67
"github.com/ydb-platform/ydb-go-sdk/v3/internal/xstring"
78
)
89

910
func Join(errs ...error) *joinError {
1011
return &joinError{
11-
errs: errs,
12+
errs: xslices.Filter(errs, func(err error) bool {
13+
return err != nil
14+
}),
1215
}
1316
}
1417

0 commit comments

Comments
 (0)