diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-02-05 14:12:04 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-02-05 22:36:18 +0000 |
commit | 9ee51745f767a8a95dfe7be095e19c9f79da4036 (patch) | |
tree | 1bdc01c900a66182f207a115e75009374e294575 | |
parent | e5b9c1068913c09f90ca4d7f8b0d97903f37fc1c (diff) | |
download | go-9ee51745f767a8a95dfe7be095e19c9f79da4036.tar.gz go-9ee51745f767a8a95dfe7be095e19c9f79da4036.zip |
doc/go1.14: mention better error checking in text/template
This caused 35 test failures in Google internal code,
so it's worth mentioning in the release notes.
Updates #31810
Updates #36878
Fixes #37066
Change-Id: I2faa6bce4c7d735107eceaef7d95223844846454
Reviewed-on: https://go-review.googlesource.com/c/go/+/217978
Reviewed-by: Rob Pike <r@golang.org>
-rw-r--r-- | doc/go1.14.html | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/go1.14.html b/doc/go1.14.html index 35f9955d2a..b3423f8753 100644 --- a/doc/go1.14.html +++ b/doc/go1.14.html @@ -823,6 +823,20 @@ appropriately.) </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> |