Thanks, Jan, but the error type in question is 3rd party so can't be
extended with Is() :)
Best,
Arve
On Fri, Nov 27, 2020 at 3:00 PM Jan Mercl <0xj...@gmail.com> wrote:
> On Fri, Nov 27, 2020 at 2:46 PM Arve Knudsen
> wrote:
>
> > I've noticed that errors.Is returns false if you compare two er
On Fri, Nov 27, 2020 at 2:46 PM Arve Knudsen wrote:
> 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
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. Ple