We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b94b0f8 commit 44474a2Copy full SHA for 44474a2
error.go
@@ -25,9 +25,8 @@ func (e *joinedError) Error() string {
25
len(e.Errors), strings.Join(points, "\n"))
26
}
27
28
-// WrappedErrors implements the errwrap.Wrapper interface to make this
29
-// return value more useful with the errwrap and go-multierror libraries.
30
-func (e *joinedError) WrappedErrors() []error {
+// Unwrap implements the Unwrap function added in Go 1.20.
+func (e *joinedError) Unwrap() []error {
31
if e == nil {
32
return nil
33
@@ -40,6 +39,7 @@ func (e *joinedError) WrappedErrors() []error {
40
39
return result
41
42
+// TODO: replace with errors.Join when Go 1.20 is minimum version.
43
func appendErrors(errors []string, err error) []string {
44
switch e := err.(type) {
45
case *joinedError:
0 commit comments