|
|
|
|
|
by Jacobinski
1099 days ago
|
|
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 |
|