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…
ecnahc515•4mo 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•4mo ago
The linter in the post is `err113`. `errortype` does already warn:
eik•4mo ago
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…