Examples using... "text/template"
Recent
This example demonstrates how to use one group of driver
templates with distinct sets of helper templates.
This example demonstrates one way to share some templates
and use them in different contexts. In this variant we add multiple driver
templates by hand to an existing bundle of templates.
Here we demonstrate loading a set of templates from a directory.
This example demonstrates a custom function to process template text.
It installs the strings.Title function and uses it to
Make Title Text Look Good In Our Template's Output.
Template is the representation of a parsed template. The *parse.Tree
field is exported only for use by html/template and should be treated
as unexported by all other clients.
Template is the representation of a parsed template. The *parse.Tree
field is exported only for use by html/template and should be treated
as unexported by all other clients.
RunParallel runs a benchmark in parallel.
It creates multiple goroutines and distributes b.N iterations among them.
The number of goroutines defaults to GOMAXPROCS. To increase parallelism for
non-CPU-bound benchmarks, call SetParallelism before RunParallel.
RunParallel is usually used with the go t...
https://rawgit.com/mikesamuel/sanitized-jquery-templates/trunk/safetemplate.html#problem_definition defines "safe" as used by this package.
https://rawgit.com/mikesamuel/sanitized-jquery-templates/trunk/safetemplate.html#problem_definition defines "safe" as used by this package.
https://rawgit.com/mikesamuel/sanitized-jquery-templates/trunk/safetemplate.html#problem_definition defines "safe" as used by this package.
Delims sets the action delimiters to the specified strings, to be used in
subsequent calls to Parse, ParseFiles, or ParseGlob. Nested template
definitions will inherit the settings. An empty delimiter stands for the
corresponding default: {{ or }}.
The return value is the template, so calls can be c...
This example demonstrates how to use one group of driver
templates with distinct sets of helper templates.
This example demonstrates one way to share some templates
and use them in different contexts. In this variant we add multiple driver
templates by hand to an existing bundle of templates.
Here we demonstrate loading a set of templates from a directory.
Template is a specialized Template from "text/template" that produces a safe
HTML document fragment.