diff options
author | Ian Lance Taylor <iant@golang.org> | 2017-02-21 12:48:45 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2017-02-22 17:42:28 +0000 |
commit | dc6af19ff8b44e56abc1217af27fe098c78c932b (patch) | |
tree | 95a292b8cd24e229a809a55b9acf27214657296f /src/context | |
parent | ea48c9d2325dfe3ccd64a2bfeea9516cb5a1d2e3 (diff) | |
download | go-dc6af19ff8b44e56abc1217af27fe098c78c932b.tar.gz go-dc6af19ff8b44e56abc1217af27fe098c78c932b.zip |
context: document that Err is unspecified before Done
It could have been defined the other way, but since the behavior has
been unspecified, this is the conservative approach for people writing
different implementations of the Context interface.
Change-Id: I7334a4c674bc2330cca6874f7cac1eb0eaea3cff
Reviewed-on: https://go-review.googlesource.com/37375
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Sameer Ajmani <sameer@golang.org>
Run-TryBot: Sameer Ajmani <sameer@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/context')
-rw-r--r-- | src/context/context.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/context/context.go b/src/context/context.go index c60d378818..cfd1c09fcc 100644 --- a/src/context/context.go +++ b/src/context/context.go @@ -100,6 +100,7 @@ type Context interface { // Canceled if the context was canceled or DeadlineExceeded if the // context's deadline passed. No other values for Err are defined. // After Done is closed, successive calls to Err return the same value. + // Err's return value is unspecified before Done is closed. Err() error // Value returns the value associated with this context for key, or nil |