Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go 1.20: Errors() should support any multi-error #70

Closed
abhinav opened this issue Feb 10, 2023 · 1 comment · Fixed by #75
Closed

Go 1.20: Errors() should support any multi-error #70

abhinav opened this issue Feb 10, 2023 · 1 comment · Fixed by #75

Comments

@abhinav
Copy link
Collaborator

abhinav commented Feb 10, 2023

Follow up to #69

Now that the interface for errors wrapping multiple errors has been standardized to, Unwrap() []error, the multierr.Errors(error) []error function should support any error that conforms to it, not just its own error type.

This behavior should be gated behind the go1.20 build tag.

@tchung1118
Copy link

Internal Ref: GO-1883

sywhang added a commit that referenced this issue Mar 14, 2023
Starting Go 1.20, any multi-error should conform to the standard
unwrap method: Unwrap() []error.

This changes multierr.Errors() method to support any error that
complies to that interface.

Fix #70.
sywhang added a commit that referenced this issue Mar 14, 2023
Starting Go 1.20, any multi-error should conform to the standard
unwrap method: Unwrap() []error.

This changes multierr.Errors() method to support any error that
complies to that interface.

Fix #70.
sywhang added a commit that referenced this issue Mar 16, 2023
Starting Go 1.20, any multi-error should conform to the standard unwrap
method: Unwrap() []error.

This changes multierr.Errors() method to support any error that complies
to that interface.

Fix #70 / GO-1883
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants