Closed ajatprabha closed 8 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
0020145
) 98.97% compared to head (919eca4
) 98.85%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Is it possible to support errors.Is
? Something like
if errors.Is(err, xload.ErrRequired):
...
Is it possible to support
errors.Is
? Something likeif errors.Is(err, xload.ErrRequired): ...
errors.Is
would not work as it cannot work with struct types but only initialized variables, errors.As
will work instead, syntax would look like:
var reqErr xload.ErrRequired
if errors.As(err, &reqErr) {
...
}
Current errors do not provide much info into where to look for malformed values. This change aims to provide more context around errors.