3 ms·
If you’re needing to implement this I’d highly suggest your code could be restructured to eliminate the issues. This is a code smell. I’ve been using errors.Is
by hellcow 4y ago
If you’re needing to implement this I’d highly suggest your code could be restructured to eliminate the issues. This is a code smell.
I’ve been using errors.Is since day one and have never once needed to implement anything like you described. I define sentinel errors in my root “business logic and types” package, and my child packages use those special errors in their own error Is() methods.