aboutsummaryrefslogtreecommitdiff
path: root/src/html
diff options
context:
space:
mode:
authorEmmanuel T Odeke <emmanuel@orijtech.com>2022-03-05 14:48:27 +0300
committerEmmanuel Odeke <emmanuel@orijtech.com>2022-03-31 00:54:34 +0000
commit81f1cc52abb0b004d8cd1b130ea293026419acac (patch)
tree617daa1a8b662add90094f894ce79f600ca25c56 /src/html
parent0a6ddcc4f03b5a89bf2eadee1fe284faf0e20be2 (diff)
downloadgo-81f1cc52abb0b004d8cd1b130ea293026419acac.tar.xz
html/template: make FuncMap a type alias of text/template.FuncMap
In preparation to make html/template and text/template use a single generics package, this change make FuncMap a type alias of text/template.FuncMap. Fixes #46121 Change-Id: I5e94cc8fdf4fe029ff223992b5cdfe79f9c098ab Reviewed-on: https://go-review.googlesource.com/c/go/+/389156 Trust: Emmanuel Odeke <emmanuel@orijtech.com> Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/html')
-rw-r--r--src/html/template/template.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/html/template/template.go b/src/html/template/template.go
index 7eba716f1b..952f52979d 100644
--- a/src/html/template/template.go
+++ b/src/html/template/template.go
@@ -328,14 +328,7 @@ func (t *Template) Name() string {
return t.text.Name()
}
-// FuncMap is the type of the map defining the mapping from names to
-// functions. Each function must have either a single return value, or two
-// return values of which the second has type error. In that case, if the
-// second (error) argument evaluates to non-nil during execution, execution
-// terminates and Execute returns that error. FuncMap has the same base type
-// as FuncMap in "text/template", copied here so clients need not import
-// "text/template".
-type FuncMap map[string]any
+type FuncMap = template.FuncMap
// Funcs adds the elements of the argument map to the template's function map.
// It must be called before the template is parsed.