Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
b2efedbf
Commit
b2efedbf
authored
Feb 28, 2011
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
template: document the delimiters better
R=golang-dev, rsc CC=golang-dev
https://golang.org/cl/4248047
parent
dd51f353
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
src/pkg/template/template.go
src/pkg/template/template.go
+7
-1
No files found.
src/pkg/template/template.go
View file @
b2efedbf
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment