Closed forgoty closed 1 year ago
I am trying to type assert multiples errors created with errors.Join
errors.Join
err := errors.Join(errors.New("err1"), errors.New("err2")) errs, ok := err.(interface{ Unwrap() []error })
This code results in a warning:
type assertion on error will fail on wrapped errors. Use errors.As to check for specific errors (errorlint) errs, ok := err.(interface{ Unwrap() []error }) ^
This is a valid case for me from go 1.20. Seems should be whitelisted.
Fixed! Thanks for reporting :)
I am trying to type assert multiples errors created with
errors.Join
This code results in a warning:
This is a valid case for me from go 1.20. Seems should be whitelisted.