Re:Gopher Wrangling. Effective error handling in Go
by throwaway894345 on Thursday June 22, 2023 @09:56PM
(#36441891)
This isn’t my experience. Most popular libraries seem to give an error type or value at least when someone might reasonably want to match on it. But yeah, if your coworkers don’t do this then Go can’t stop them (and in any case, I don’t see how fmt.Errorf() is to blame).
So, in practice, neither errors.Is nor errors.As are terribly useful, and %w just gives you a false sense of usefulness.