]> Cypherpunks.ru repositories - gostls13.git/commitdiff
context: add docs to ExampleWithValue
authorIoannis Georgoulas <geototti21@hotmail.com>
Sat, 15 Jul 2017 18:16:56 +0000 (12:16 -0600)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 12 Jun 2018 22:33:54 +0000 (22:33 +0000)
Change-Id: I3a83c63f4db2e46fd96f373378a429896e93f9d1
Reviewed-on: https://go-review.googlesource.com/48861
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/context/example_test.go

index b2c2aa921da3591a1a2cb63bd3b8a4bdc77b867c..2b28b577042d6a8d71074d75591f70106a91d793 100644 (file)
@@ -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