From: Ian Lance Taylor Date: Wed, 5 Feb 2020 22:12:04 +0000 (-0800) Subject: doc/go1.14: mention better error checking in text/template X-Git-Tag: go1.14~10^2~3 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9ee51745f767a8a95dfe7be095e19c9f79da4036;p=gostls13.git 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 --- 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.)

+
text/template
+
+

+ 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 + {{if (eq .F "a") or (eq .F "b")}}. + This should be written as {{if or (eq .F "a") (eq .F "b")}}. + The erroneous case never worked as expected, and will now be + reported with an error can't give argument to non-function. +

+
+
+
unicode