]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.15: include behavior updates to the context package
authorAndrew <andybons@golang.org>
Wed, 12 Aug 2020 21:45:48 +0000 (17:45 -0400)
committerAndrew Bonventre <andybons@golang.org>
Wed, 12 Aug 2020 23:25:46 +0000 (23:25 +0000)
Fixes #40737

Change-Id: I8e2c1e1653d427af1ded6d61df1aa450e3c4d35c
Reviewed-on: https://go-review.googlesource.com/c/go/+/248329
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
doc/go1.15.html

index 3a12ecfa11ad284132f5dd01e99e75f9991402f5..c691bf3bd5b35556d185664e5029bcc16788eb1f 100644 (file)
@@ -436,6 +436,19 @@ Do not send CLs removing the interior tags from such phrases.
   </dd>
 </dl><!-- bufio -->
 
+<dl id="context"><dt><a href="/pkg/context/">context</a></dt>
+  <dd>
+    <p><!-- CL 223777 -->
+      Creating a derived <code>Context</code> using a nil parent is now explicitly
+      disallowed. Any attempt to do so with the
+      <a href="/pkg/context/#WithValue"><code>WithValue</code></a>,
+      <a href="/pkg/context/#WithDeadline"><code>WithDeadline</code></a>, or
+      <a href="/pkg/context/#WithCancel"><code>WithCancel</code></a> functions
+      will cause a panic.
+    </p>
+  </dd>
+</dl><!-- context -->
+
 <dl id="crypto"><dt><a href="/pkg/crypto/">crypto</a></dt>
   <dd>
     <p><!-- CL 231417, CL 225460 -->