[x] I have looked at the documentation here first?
[x] I have looked at the examples provided that may showcase my question here?
Package version eg. v9, v10:
v10
Issue, Question or Enhancement:
Provide support for the errors.As. Go 1.13+ has addition of errors.As that helps to cast given error the target if it or one of its nested errors implements the type of target.
To add support for the errors.As functionality all publicly available errors should implement As method of the following signature:
As(interface{}) bool
Code sample, to showcase or reproduce:
err := validator.Struct(&v)
if err != nil {
err = fmt.Errorf("wrapped error: %w", err)
}
// ...
var validationErr *validation.ValidationErrors
ok := errors.As(err, &validationErr) // true
Package version eg. v9, v10:
v10
Issue, Question or Enhancement:
Provide support for the errors.As. Go 1.13+ has addition of
errors.As
that helps to cast given error thetarget
if it or one of its nested errors implements the type oftarget
.To add support for the
errors.As
functionality all publicly available errors should implementAs
method of the following signature:Code sample, to showcase or reproduce: