diff options
author | Damien Neil <dneil@google.com> | 2021-08-06 10:33:08 -0700 |
---|---|---|
committer | Damien Neil <dneil@google.com> | 2021-09-09 16:32:28 +0000 |
commit | a53e3d5f885ca7a0df1cd6cf65faa5b63a802dce (patch) | |
tree | ae714ecc7a7dcbe7ea7e71573984be44810aad40 | |
parent | 19457a58e565ff5b480c3806fe02fbc7ccdf32f0 (diff) | |
download | go-a53e3d5f885ca7a0df1cd6cf65faa5b63a802dce.tar.gz go-a53e3d5f885ca7a0df1cd6cf65faa5b63a802dce.zip |
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>
-rw-r--r-- | src/net/net.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/net/net.go b/src/net/net.go index a7c65fff79..ab6aeaac2f 100644 --- a/src/net/net.go +++ b/src/net/net.go @@ -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. |