Skip to content

Commit

Permalink
doc/go1.14: mention better error checking in text/template
Browse files Browse the repository at this point in the history
This caused 35 test failures in Google internal code,
so it's worth mentioning in the release notes.

Updates golang#31810
Updates golang#36878
Fixes golang#37066

Change-Id: I2faa6bce4c7d735107eceaef7d95223844846454
Reviewed-on: https://go-review.googlesource.com/c/go/+/217978
Reviewed-by: Rob Pike <r@golang.org>
  • Loading branch information
ianlancetaylor committed Feb 5, 2020
1 parent e5b9c10 commit 9ee5174
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions doc/go1.14.html
Expand Up @@ -823,6 +823,20 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
</p>
</dl><!-- testing -->

<dl id="text/template"><dt><a href="/pkg/text/template/">text/template</a></dt>
<dd>
<p><!-- CL 206124 -->
The text/template package now correctly reports errors when a
parenthesized argument is used as a function.
This most commonly shows up in erroneous cases like
<code>{{if (eq .F "a") or (eq .F "b")}}</code>.
This should be written as <code>{{if or (eq .F "a") (eq .F "b")}}</code>.
The erroneous case never worked as expected, and will now be
reported with an error <code>can't give argument to non-function</code>.
</p>
</dd>
</dl><!-- text/template -->

<dl id="unicode"><dt><a href="/pkg/unicode/">unicode</a></dt>
<dd>
<p>
Expand Down

0 comments on commit 9ee5174

Please sign in to comment.