cockroachdb / errors

Go error library with error portability over the network
Apache License 2.0
2.04k stars 66 forks source link

Add Go 1.20 errors.Join support #118

Closed dhartunian closed 11 months ago

dhartunian commented 11 months ago

This PR contains the Join implementation from #106 and adds some adjustments to fit the rest of the library's style.

We move the newly added Join implementation that mirrors the go 1.20 stdlib function into a separate package like the rest of our custom error types.

Some simple unit tests are added and Join wrappers are also integrated into the datadriven formatting test. Our existing format code for multi-cause errors is compatible with this new type which allows us to remove the custom formatter from the implementation.


Please review last 2 commits. First one is #115.


This change is Reviewable

dhartunian commented 11 months ago

@knz PTAL

knz commented 11 months ago

CI is trying to tell you something.

I'd say let's merge #115 then you can rebase this which will make the review easier.

dhartunian commented 11 months ago

CI is trying to tell you something.

lol fixed 😄