Hello!
I've noticed that errors.Is returns false if you compare two error instances that are implemented as pointers. I.e., I'm using a struct where the Error method has a pointer receiver, and when passing struct instance pointers to errors.Is, it ends up comparing them by pointer address. Please see my
example to see what I mean.
Is this a bug in errors.Is or is it actually supposed to work this way? It really took us by surprise, and we ended up having to use errors.As instead since it does handle this case.
For reference, I've already made a patch to errors.Is that changes it to support pointer arguments :)
Best,
Arve