mirror of https://github.com/golang/go.git
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.
|
// An Error represents a network error.
|
||||||
type Error interface {
|
type Error interface {
|
||||||
error
|
error
|
||||||
Timeout() bool // Is the error a timeout?
|
Timeout() bool // Is the error a timeout?
|
||||||
Temporary() bool // Is the error temporary?
|
|
||||||
|
// 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.
|
// Various errors contained in OpError.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue