]> Cypherpunks repositories - gostls13.git/commitdiff
template: document the delimiters better
authorRob Pike <r@golang.org>
Mon, 28 Feb 2011 18:27:33 +0000 (10:27 -0800)
committerRob Pike <r@golang.org>
Mon, 28 Feb 2011 18:27:33 +0000 (10:27 -0800)
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4248047

src/pkg/template/template.go

index 36fd06dc22c941e268ed6da0af3286d6f1820a06..c3cb8901a09f473290ee60d3fec1e6ef60d7a50b 100644 (file)
@@ -24,7 +24,8 @@
                - The result of invoking a niladic single-valued method with that name
                  (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 }
 
        Multiple formatters separated by the pipeline character | are
        executed sequentially, with each formatter receiving the bytes
        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