Skip to content

Commit

Permalink
doc/go1.18: document {text,html}/template {break,continue} commands
Browse files Browse the repository at this point in the history
For #20531
For #47694

Change-Id: Iaefaa0a8982eabf59cd6a53120c8af9124d60d1a
Reviewed-on: https://go-review.googlesource.com/c/go/+/373915
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
  • Loading branch information
ianlancetaylor committed Dec 22, 2021
1 parent ebac50e commit 90fb5a4
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions doc/go1.18.html
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,17 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
</dd>
</dl>

<dl id="html/template"><dt><a href="/pkg/html/template/">html/template</a></dt>
<dd>
<p><!-- CL 321491 -->
Within a <code>range</code> pipeline the new
<code>{{break}}</code> command will end the loop early and the
new <code>{{continue}}</code> command will immediately start the
next loop iteration.
</p>
</dd>
</dl><!-- html/template -->

<dl id="image/draw"><dt><a href="/pkg/image/draw/">image/draw</a></dt>
<dd>
<p><!-- CL 340049 -->
Expand Down Expand Up @@ -907,6 +918,13 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>

<dl id="text/template"><dt><a href="/pkg/text/template/">text/template</a></dt>
<dd>
<p><!-- CL 321491 -->
Within a <code>range</code> pipeline the new
<code>{{break}}</code> command will end the loop early and the
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
Expand All @@ -917,6 +935,25 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
</dd>
</dl><!-- text/template -->

<dl id="text/template/parse"><dt><a href="/pkg/text/template/parse/">text/template/parse</a></dt>
<dd>
<p><!-- CL 321491 -->
The package supports the new
<a href="/pkg/text/template/">text/template</a> and
<a href="/pkg/html/template/">html/template</a>
<code>{{break}}</code> command via the new constant
<a href="/pkg/text/template/parse#NodeBreak"><code>NodeBreak</code></a>
and the new type
<a href="/pkg/text/template/parse#BreakNode"><code>BreakNode</code></a>,
and similarly supports the new <code>{{continue}}</code> command
via the new constant
<a href="/pkg/text/template/parse#NodeContinue"><code>NodeContinue</code></a>
and the new type
<a href="/pkg/text/template/parse#ContinueNode"><code>ContinueNode</code></a>.
</p>
</dd>
</dl><!-- text/template -->

<dl id="unicode/utf8"><dt><a href="/pkg/unicode/utf8/">unicode/utf8</a></dt>
<dd>
<p><!-- CL 345571 -->
Expand Down

0 comments on commit 90fb5a4

Please sign in to comment.