Skip to content

Commit 90fb5a4

Browse files
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 <[email protected]> Reviewed-by: Emmanuel Odeke <[email protected]>
1 parent ebac50e commit 90fb5a4

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

doc/go1.18.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,17 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
678678
</dd>
679679
</dl>
680680

681+
<dl id="html/template"><dt><a href="/pkg/html/template/">html/template</a></dt>
682+
<dd>
683+
<p><!-- CL 321491 -->
684+
Within a <code>range</code> pipeline the new
685+
<code>{{break}}</code> command will end the loop early and the
686+
new <code>{{continue}}</code> command will immediately start the
687+
next loop iteration.
688+
</p>
689+
</dd>
690+
</dl><!-- html/template -->
691+
681692
<dl id="image/draw"><dt><a href="/pkg/image/draw/">image/draw</a></dt>
682693
<dd>
683694
<p><!-- CL 340049 -->
@@ -907,6 +918,13 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
907918

908919
<dl id="text/template"><dt><a href="/pkg/text/template/">text/template</a></dt>
909920
<dd>
921+
<p><!-- CL 321491 -->
922+
Within a <code>range</code> pipeline the new
923+
<code>{{break}}</code> command will end the loop early and the
924+
new <code>{{continue}}</code> command will immediately start the
925+
next loop iteration.
926+
</p>
927+
910928
<p><!-- CL 321490 -->
911929
The <code>and</code> function no longer always evaluates all arguments; it
912930
stops evaluating arguments after the first argument that evaluates to
@@ -917,6 +935,25 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
917935
</dd>
918936
</dl><!-- text/template -->
919937

938+
<dl id="text/template/parse"><dt><a href="/pkg/text/template/parse/">text/template/parse</a></dt>
939+
<dd>
940+
<p><!-- CL 321491 -->
941+
The package supports the new
942+
<a href="/pkg/text/template/">text/template</a> and
943+
<a href="/pkg/html/template/">html/template</a>
944+
<code>{{break}}</code> command via the new constant
945+
<a href="/pkg/text/template/parse#NodeBreak"><code>NodeBreak</code></a>
946+
and the new type
947+
<a href="/pkg/text/template/parse#BreakNode"><code>BreakNode</code></a>,
948+
and similarly supports the new <code>{{continue}}</code> command
949+
via the new constant
950+
<a href="/pkg/text/template/parse#NodeContinue"><code>NodeContinue</code></a>
951+
and the new type
952+
<a href="/pkg/text/template/parse#ContinueNode"><code>ContinueNode</code></a>.
953+
</p>
954+
</dd>
955+
</dl><!-- text/template -->
956+
920957
<dl id="unicode/utf8"><dt><a href="/pkg/unicode/utf8/">unicode/utf8</a></dt>
921958
<dd>
922959
<p><!-- CL 345571 -->

0 commit comments

Comments
 (0)