]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.18: note short-circuit and/or in html/template
authorRuss Cox <rsc@golang.org>
Thu, 20 Jan 2022 13:54:59 +0000 (08:54 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 26 Jan 2022 20:51:54 +0000 (20:51 +0000)
It was already noted in text/template; copied from there.

Change-Id: Ie749d04004af60f2333073ddf556ff7e16c81c45
Reviewed-on: https://go-review.googlesource.com/c/go/+/379794
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
doc/go1.18.html

index 4d1b6520ee6ea443b1f4b19844ea2f6f23b2a3da..fb9e685c69695ab744e74e9fbfab25d4b7920329 100644 (file)
@@ -571,7 +571,7 @@ Do not send CLs removing the interior tags from such phrases.
 
     <p><!-- CL 323318, CL 332771 -->
       <a href="/pkg/bytes/#Trim"><code>Trim</code></a>, <a href="/pkg/bytes/#TrimLeft"><code>TrimLeft</code></a>,
-      and <a href="/pkg/bytes/#TrimRight"><code>TrimRight</code></a> are now allocation free and, especially for 
+      and <a href="/pkg/bytes/#TrimRight"><code>TrimRight</code></a> are now allocation free and, especially for
       small ASCII cutsets, up to 10 times faster.
     </p>
 
@@ -759,6 +759,14 @@ Do not send CLs removing the interior tags from such phrases.
       new <code>{{continue}}</code> command will immediately start the
       next loop iteration.
     </p>
+
+    <p><!-- CL 321490 -->
+      The <code>and</code> function no longer always evaluates all arguments; it
+      stops evaluating arguments after the first argument that evaluates to
+      false.  Similarly, the <code>or</code> function now stops evaluating
+      arguments after the first argument that evaluates to true. This makes a
+      difference if any of the arguments is a function call.
+    </p>
   </dd>
 </dl><!-- html/template -->
 
@@ -938,7 +946,7 @@ Do not send CLs removing the interior tags from such phrases.
 
     <p><!-- CL 323318, CL 332771 -->
       <a href="/pkg/strings/#Trim"><code>Trim</code></a>, <a href="/pkg/strings/#TrimLeft"><code>TrimLeft</code></a>,
-      and <a href="/pkg/strings/#TrimRight"><code>TrimRight</code></a> are now allocation free and, especially for 
+      and <a href="/pkg/strings/#TrimRight"><code>TrimRight</code></a> are now allocation free and, especially for
       small ASCII cutsets, up to 10 times faster.
     </p>