mirror of
https://github.com/golang/go
synced 2024-11-24 04:50:07 -07:00
net: deprecate (net.Error).Temporary
Fixes #45729. Change-Id: I819dd0cc79fc23baac46cafd78bb80f5133c992b Reviewed-on: https://go-review.googlesource.com/c/go/+/340261 Trust: Damien Neil <dneil@google.com> Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Damien Neil <dneil@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
19457a58e5
commit
a53e3d5f88
@ -396,8 +396,12 @@ type Listener interface {
|
||||
// An Error represents a network error.
|
||||
type Error interface {
|
||||
error
|
||||
Timeout() bool // Is the error a timeout?
|
||||
Temporary() bool // Is the error temporary?
|
||||
Timeout() bool // Is the error a timeout?
|
||||
|
||||
// Deprecated: Temporary errors are not well-defined.
|
||||
// Most "temporary" errors are timeouts, and the few exceptions are surprising.
|
||||
// Do not use this method.
|
||||
Temporary() bool
|
||||
}
|
||||
|
||||
// Various errors contained in OpError.
|
||||
|
Loading…
Reference in New Issue
Block a user