mirror of https://github.com/golang/go.git
context: add docs to ExampleWithValue
Change-Id: I3a83c63f4db2e46fd96f373378a429896e93f9d1 Reviewed-on: https://go-review.googlesource.com/48861 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
be36bd996e
commit
2cf9732e8a
|
|
@ -93,6 +93,8 @@ func ExampleWithTimeout() {
|
|||
// context deadline exceeded
|
||||
}
|
||||
|
||||
// This example demonstrates how a value can be passed to the context
|
||||
// and also how to retrieve it if it exists.
|
||||
func ExampleWithValue() {
|
||||
type favContextKey string
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue