text/template: fixed typo in a nested template definition

This commit is contained in:
kurochan 2022-09-14 09:10:27 +09:00
parent a813be86df
commit 6f1430fe16

View file

@ -424,10 +424,10 @@ The syntax of such definitions is to surround each template declaration with a
The define action names the template being created by providing a string
constant. Here is a simple example:
`{{define "T1"}}ONE{{end}}
{{define "T1"}}ONE{{end}}
{{define "T2"}}TWO{{end}}
{{define "T3"}}{{template "T1"}} {{template "T2"}}{{end}}
{{template "T3"}}`
{{template "T3"}}
This defines two templates, T1 and T2, and a third T3 that invokes the other two
when it is executed. Finally it invokes T3. If executed this template will