diff options
| author | cuiweixie <cuiweixie@gmail.com> | 2023-05-19 10:07:04 +0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-05-19 16:51:35 +0000 |
| commit | 944911af5630bec413237b9aba010661a353953e (patch) | |
| tree | 2ccabdcaafc5b023446447305bebf2760bafdbbb /src/html/template/error.go | |
| parent | 24617a068c55d0ee7ef56d1b9fb951ee1e75f67d (diff) | |
| download | go-944911af5630bec413237b9aba010661a353953e.tar.xz | |
html/template: expose ErrJSTemplate
Fixes #59584
Change-Id: Iabe61476c7457dfffbfe5d0b1fe904901a466c73
Reviewed-on: https://go-review.googlesource.com/c/go/+/496395
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: xie cui <523516579@qq.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Diffstat (limited to 'src/html/template/error.go')
| -rw-r--r-- | src/html/template/error.go | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/html/template/error.go b/src/html/template/error.go index d7d6f5b3ab..a763924d4a 100644 --- a/src/html/template/error.go +++ b/src/html/template/error.go @@ -215,18 +215,13 @@ const ( // disallowed. Avoid using "html" and "urlquery" entirely in new templates. ErrPredefinedEscaper - // errJSTmplLit: "... appears in a JS template literal" + // ErrJSTemplate: "... appears in a JS template literal" // Example: - // <script>var tmpl = `{{.Interp}`</script> + // <script>var tmpl = `{{.Interp}}`</script> // Discussion: // Package html/template does not support actions inside of JS template // literals. - // - // TODO(rolandshoemaker): we cannot add this as an exported error in a minor - // release, since it is backwards incompatible with the other minor - // releases. As such we need to leave it unexported, and then we'll add it - // in the next major release. - errJSTmplLit + ErrJSTemplate ) func (e *Error) Error() string { |
