Commit b2efedbf authored by Rob Pike's avatar Rob Pike

template: document the delimiters better

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4248047
parent dd51f353
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
- The result of invoking a niladic single-valued method with that name - The result of invoking a niladic single-valued method with that name
(result = data.field()) (result = data.field())
Major constructs ({} are metacharacters; [] marks optional elements): Major constructs ({} are the default delimiters for template actions;
[] are the notation in this comment for optional elements):
{# comment } {# comment }
...@@ -74,6 +75,11 @@ ...@@ -74,6 +75,11 @@
Multiple formatters separated by the pipeline character | are Multiple formatters separated by the pipeline character | are
executed sequentially, with each formatter receiving the bytes executed sequentially, with each formatter receiving the bytes
emitted by the one to its left. emitted by the one to its left.
The delimiter strings get their default value, "{" and "}", from
JSON-template. They may be set to any non-empty, space-free
string using the SetDelims method. Their value can be printed
in the output using {.meta-left} and {.meta-right}.
*/ */
package template package template
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment