From 90fb5a4f97a11bb3aa4a6143ec687d20b35ef010 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 21 Dec 2021 14:44:27 -0800 Subject: [PATCH] doc/go1.18: document {text,html}/template {break,continue} commands For #20531 For #47694 Change-Id: Iaefaa0a8982eabf59cd6a53120c8af9124d60d1a Reviewed-on: https://go-review.googlesource.com/c/go/+/373915 Trust: Ian Lance Taylor Reviewed-by: Emmanuel Odeke --- doc/go1.18.html | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/doc/go1.18.html b/doc/go1.18.html index 90bc0aa132..cea45542db 100644 --- a/doc/go1.18.html +++ b/doc/go1.18.html @@ -678,6 +678,17 @@ Do not send CLs removing the interior tags from such phrases. +
html/template
+
+

+ Within a range pipeline the new + {{break}} command will end the loop early and the + new {{continue}} command will immediately start the + next loop iteration. +

+
+
+
image/draw

@@ -907,6 +918,13 @@ Do not send CLs removing the interior tags from such phrases.

text/template
+

+ Within a range pipeline the new + {{break}} command will end the loop early and the + new {{continue}} command will immediately start the + next loop iteration. +

+

The and function no longer always evaluates all arguments; it stops evaluating arguments after the first argument that evaluates to @@ -917,6 +935,25 @@ Do not send CLs removing the interior tags from such phrases.

+
text/template/parse
+
+

+ The package supports the new + text/template and + html/template + {{break}} command via the new constant + NodeBreak + and the new type + BreakNode, + and similarly supports the new {{continue}} command + via the new constant + NodeContinue + and the new type + ContinueNode. +

+
+
+
unicode/utf8