diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-02-05 15:34:50 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-02-05 23:48:55 +0000 |
commit | dd0aa799ebbcb42cbc8d15aaa3edf905e8e1d83a (patch) | |
tree | 918d3d7102cd5cd225fe5c25b447b3a1aa0486ff | |
parent | 9ee51745f767a8a95dfe7be095e19c9f79da4036 (diff) | |
download | go-dd0aa799ebbcb42cbc8d15aaa3edf905e8e1d83a.tar.gz go-dd0aa799ebbcb42cbc8d15aaa3edf905e8e1d83a.zip |
doc/go1.14: quote {{ and }} in text/template note
Fixes #37070
Change-Id: I543957df264367e56c71a25bfaea5cf7935d438f
Reviewed-on: https://go-review.googlesource.com/c/go/+/217979
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
-rw-r--r-- | doc/go1.14.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/go1.14.html b/doc/go1.14.html index b3423f8753..ec7f8e4f43 100644 --- a/doc/go1.14.html +++ b/doc/go1.14.html @@ -829,8 +829,8 @@ appropriately.) 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>. + <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> |