For correct working go 1.13 error chains (including errors.Is()) needs implementation of interface:
type wrapper interface {
Unwrap() error
}
For example:
when i use github.com/gojek/heimdall and if at the time of request occurred context cancel, i am check it as if errors.Is(err, context.Canceled) {}, but it's not work because heimdall use valkyrie multierror that does't support method Unwrap.
For correct working go 1.13 error chains (including
errors.Is()) needs implementation of interface:For example:
when i use
github.com/gojek/heimdalland if at the time of request occurred context cancel, i am check it asif errors.Is(err, context.Canceled) {}, but it's not work because heimdall use valkyrie multierror that does't support method Unwrap.