mirror of
https://github.com/golang/go
synced 2024-11-22 09:54:40 -07:00
doc/go1.19: use the right package error.Is arguments
They were swapped. Fixes #52205 Change-Id: Iea2626aa2204f3bc96d08c571a1aa669436a32ad Reviewed-on: https://go-review.googlesource.com/c/go/+/398895 Trust: Ian Lance Taylor <iant@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
79619c3c7e
commit
6f6942ef7a
@ -106,9 +106,9 @@ Do not send CLs removing the interior tags from such phrases.
|
||||
<p><!-- CL 396877 -->
|
||||
When a net package function or method returns an "I/O timeout"
|
||||
error, the error will now satisfy <code>errors.Is(err,
|
||||
context.Canceled)</code>. When a net package function returns
|
||||
an "operation was canceled" error, the error will now satisfy
|
||||
<code>errors.Is(err, context.DeadlineExceeded)</code>.
|
||||
context.DeadlineExceeded)</code>. When a net package function
|
||||
returns an "operation was canceled" error, the error will now
|
||||
satisfy <code>errors.Is(err, context.Canceled)</code>.
|
||||
These changes are intended to make it easier for code to test
|
||||
for cases in which a context cancelation or timeout causes a net
|
||||
package function or method to return an error, while preserving
|
||||
|
Loading…
Reference in New Issue
Block a user