3 ms·
As others have mentioned, this isn't true. `errors.Is` is for named error instances (like `io.EOF`) while `errors.As` is for matching against a particular type
by throwaway894345 3y ago
As others have mentioned, this isn't true. `errors.Is` is for named error instances (like `io.EOF`) while `errors.As` is for matching against a particular type of error (like `net/url.Error`). `fmt.Errorf()` doesn't inhibit either case.
https://go.dev/play/p/zsks73MGZjc https://go.dev/play/p/zsks73MGZjc