mirror of
https://github.com/golang/go
synced 2024-10-06 08:00:07 +00:00
text/template: fixed typo in a nested template definition
This commit is contained in:
parent
a813be86df
commit
6f1430fe16
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue