Home | History | Annotate | Download | only in template

Lines Matching full:template

6 Package template implements data-driven templates for generating textual output.
8 To generate HTML output, see package html/template, which has the same interface
12 template refer to elements of the data structure (typically a field of a struct
14 Execution of the template walks the structure and sets the cursor, represented
18 The input text for a template is UTF-8-encoded text in any format.
23 Once parsed, a template may be executed safely in parallel.
32 tmpl, err := template.New("test").Parse("{{.Count}} items are made of {{.Material}}")
86 {{template "name"}}
87 The template with the specified name is executed with nil data.
89 {{template "name" pipeline}}
90 The template with the specified name is executed with dot set
221 "with", or "range") in which it is declared, or to the end of the template if
222 there is no such control structure. A template invocation does not inherit
260 template, then in the global function map. By default, no functions are defined
261 in the template but the Funcs method can be used to add them.
349 Each template is named by a string specified when it is created. Also, each
350 template is associated with zero or more other templates that it may invoke by
353 A template may use a template invocation to instantiate another associated
354 template; see the explanation of the "template" action above. The name must be
355 that of a template associated with the template that contains the invocation.
357 Nested template definitions
359 When parsing a template, another template may be defined and associated with the
360 template being parsed. Template definitions must appear at the top level of the
361 template, much like global variables in a Go program.
363 The syntax of such definitions is to surround each template declaration with a
366 The define action names the template being created by providing a string
371 {{define "T3"}}{{template "T1"}} {{template "T2"}}{{end}}
372 {{template "T3"}}`
375 when it is executed. Finally it invokes T3. If executed this template will
380 By construction, a template may reside in only one association. If it's
381 necessary to have a template addressable from multiple associations, the
382 template definition must be parsed multiple times to create distinct *Template
389 A template may be executed directly or through ExecuteTemplate, which executes
390 an associated template identified by name. To invoke our example above, we
398 or to invoke a particular template explicitly by name,
406 package template