From: Ioannis Georgoulas Date: Sat, 15 Jul 2017 18:16:56 +0000 (-0600) Subject: context: add docs to ExampleWithValue X-Git-Tag: go1.11beta1~131 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2cf9732e8aae92edfa55a8d0e3cebea9154aced7;p=gostls13.git context: add docs to ExampleWithValue Change-Id: I3a83c63f4db2e46fd96f373378a429896e93f9d1 Reviewed-on: https://go-review.googlesource.com/48861 Reviewed-by: Brad Fitzpatrick --- diff --git a/src/context/example_test.go b/src/context/example_test.go index b2c2aa921d..2b28b57704 100644 --- a/src/context/example_test.go +++ b/src/context/example_test.go @@ -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