Re:Gopher Wrangling. Effective error handling in Go
by Jacobinski on Tuesday June 20, 2023 @12:31AM
(#36399737)
In the last example, it is preferable to use `if errors.Is(err, context.DeadlineExceeded) {...}` instead of the given `if err == context.DeadlineExceeded {...}` since the `errors.Is()` function will recursively unwrap error chains to find the specified error.
https://go.dev/blog/go1.13-errors