avast/retry-go

Implement `Unwrap() []error` for Go 1.20 multi-error support

ian-h-chamberlain opened this issue · 0 comments

Go 1.20 released recently, and includes support for wrapping multiple errors.

If implemented, this could probably replace WrappedErrors(), but it would be a breaking change to return a different type from Unwrap() and would also change the result of errors.Unwrap() on a retry error (as mentioned in #65). I'm not sure what the best approach for compatibility is here but it would be nice to have an API that matches up with the standard library's approach to multi-error unwrapping.