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
We should implement the Is() method introduced in Go 1.13 for the jsonresp.Error type in order to make it more usable. I propose the implementation takes the approach similar to the example in the Working with Errors in Go 1.13 blog post, comparing non-zero fields.
This would allow succinct code such as the following:
iferrors.Is(err, &jsonresp.Error{Code: http.StatusUnauthorized}) {
// Do some stuff...
}
The text was updated successfully, but these errors were encountered:
We should implement the Is() method introduced in Go 1.13 for the jsonresp.Error type in order to make it more usable. I propose the implementation takes the approach similar to the example in the Working with Errors in Go 1.13 blog post, comparing non-zero fields.
This would allow succinct code such as the following:
The text was updated successfully, but these errors were encountered: