Closed etuseeva closed 3 years ago
There is no errors.Cause
in the Go's standard library. Do you happen to be using this third party library?
This linter is intended to be used with the Go's errors library. So your options are:
errors.Is
with a similar signature, try using that. Maybe go-errorlint will be tricked into thinking you are using the standard library function :)
Hello! In our codebase a lot of such code:
And comparison linter complains about that:
This is incorrect, since
errors.Cause(err) != sql.ErrNoRows
is similar to!errors.Is(err, sql.ErrNoRows)
, isn't it?So is there a way to turn it off? Or is it a bug?
Thanks!