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

Walk: add support for go1.20 multi errors (Unwrap() []error) #18

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dolmen
Copy link

@dolmen dolmen commented Mar 21, 2024

Walk now also handles errors wrapped with go1.20 errors.Join.

A note is also added in the documentation of interface Wrapper to suggest using Unwrap() []error.

@dolmen dolmen marked this pull request as draft March 21, 2024 13:23
@dolmen dolmen changed the title Draft: Walk: add support for go1.20 multi errors (Unwrap() []error) Walk: add support for go1.20 multi errors (Unwrap() []error) Mar 21, 2024
@dolmen
Copy link
Author

dolmen commented Mar 21, 2024

I'll work on tests once #17 is merged.

@dolmen
Copy link
Author

dolmen commented Mar 21, 2024

Cc: @dnephin for review as you contributed #9

Copy link
Contributor

@dnephin dnephin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, thank you for the PR! I am no longer a maintainer on this project, so I can't give you an official response.

I believe this change is correct. Unwrap() []error is supported by the standard library, so it seems reasonable that the Walk function would also support it.

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 this pull request may close these issues.

2 participants