You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go 1.20 introduces the idea of an error with multiple causes instead
of a single chain. This commit updates the errors library to properly
encode, decode, and format these error types.
For encoding and decoding we use the existing `EncodedLeaf` type and
embellish it with a `causes` field. This is done in order to keep the
encoding/decoding backwards compatible. `EncodedLeaf` types containing
multiple causes when decided by earlier versions will simply see an
opaque leaf with a message inside. The reason the `EncodedWrapper`
is not used here is because the wrapper already contains a mandatory
single `cause` field that we cannot fill with the multi-errors. A
new type cannot be used because it would not be decodable by older
versions of this library.
0 commit comments