From 3c6295d272d09e6c7be912510e4b62afc0ef8ffc Mon Sep 17 00:00:00 2001 From: Jeremy Faller Date: Fri, 19 Nov 2021 16:51:47 -0500 Subject: [PATCH] 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 --- doc/go1.18.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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.

-- 2.50.0