From: Jeremy Faller Date: Fri, 19 Nov 2021 21:51:47 +0000 (-0500) Subject: doc/go1.18: add short-circuit evaluation for text/template X-Git-Tag: go1.18beta1~124 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3c6295d272d09e6c7be912510e4b62afc0ef8ffc;p=gostls13.git doc/go1.18: add short-circuit evaluation for text/template This description is based on https://golang.org/cl/321490. Updates #47694 Change-Id: I48656cd487d2fccf0b0d3390f350f1bc6f2b0080 Reviewed-on: https://go-review.googlesource.com/c/go/+/365738 Trust: Jeremy Faller Trust: Dmitri Shuralyov Run-TryBot: Jeremy Faller TryBot-Result: Gopher Robot Reviewed-by: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov --- diff --git a/doc/go1.18.html b/doc/go1.18.html index d9da160ab5..74d0e0c23e 100644 --- a/doc/go1.18.html +++ b/doc/go1.18.html @@ -290,7 +290,7 @@ proposal.
bufio

- The new Writer.AvailableBuffer + The new Writer.AvailableBuffer method returns an empty buffer with a possibly non-empty capacity for use with append-like APIs. After appending, the buffer can be provided to a succeeding Write call and possibly avoid any copying. @@ -517,7 +517,11 @@ proposal.

text/template

- TODO: https://golang.org/cl/321490: implement short-circuit and, or + The and function no longer always evaluates all arguments; it + stops evaluating arguments after the first argument that evaluates to + false. Similarly, the or 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.