ecnahc515 2 hours ago

If the the OP is the author, did consider filing a bug with errcheck? It should be possible for errcheck to check if the comparison is being done within an `Is(err error) bool` method and skip the warning in that case, or even better: it could check if your using `errors.Is` within an `Is` method and warn in that case!

eik 3 days ago

Having looked at the problems that can arise with errors.As:

https://news.ycombinator.com/item?id=44959638

Let's now look at how errors.Is can introduce subtle bugs that can affect the reliability of error checking, especially when trying to determine the root cause of an error.

How one letter can make such a difference…

cronelius 2 hours ago

Isn't this what Unwrap() is for? errors.Is calls Unwrap if it's available and then compares _that_ error.