We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Now, the code is clearer to me. Thanks for the changes by the way.
I would like to suggest something that would make more sense according to me
Here the code relies (and already relied) on something that single purpose could be defined by these:
The current way is OK, but somehow overkill
Here is what I would code if I had to.
We don't define a struct, we define a simple sentinel error. This will ensure we can catch the error with a simple errors.Is
errors.Is
var ErrUnexpectedPointer = errors.New("unexpected pointer")
Then we use fmt.Errorf("%w to %s", ErrUnexpectedPointer, rv.Kind.String()) here
fmt.Errorf("%w to %s", ErrUnexpectedPointer, rv.Kind.String())
I know code was there, I know I'm asking to change something you are not responsible for. But, I report what I would have expected here.
As the errors are now exported, I would expect them to be clean.
Please let me know what you think about it
Originally posted by @ccoVeille in #860 (comment)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I would like to suggest something that would make more sense according to me
Here the code relies (and already relied) on something that single purpose could be defined by these:
The current way is OK, but somehow overkill
Here is what I would code if I had to.
We don't define a struct, we define a simple sentinel error. This will ensure we can catch the error with a simple
errors.Is
Then we use
fmt.Errorf("%w to %s", ErrUnexpectedPointer, rv.Kind.String())
hereI know code was there, I know I'm asking to change something you are not responsible for. But, I report what I would have expected here.
As the errors are now exported, I would expect them to be clean.
Please let me know what you think about it
Originally posted by @ccoVeille in #860 (comment)
The text was updated successfully, but these errors were encountered: