Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
ebf2b92e
Commit
ebf2b92e
authored
Aug 21, 2011
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
effective_go: fix brace quotes.
R=golang-dev, dsymonds CC=golang-dev
https://golang.org/cl/4932044
parent
e5ddcaeb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
effective_go.html
doc/effective_go.html
+3
-2
effective_go.tmpl
doc/effective_go.tmpl
+3
-3
No files found.
doc/effective_go.html
View file @
ebf2b92e
...
...
@@ -2993,12 +2993,13 @@ from data items passed to <code>templ.Execute</code>, in this case the
form value.
Within the template text (
<code>
templateStr
</code>
),
double-brace-delimited pieces denote template actions.
The piece from the
<code></code>
executes only if the value of the current data item, called
<code>
.
</code>
,
The piece from the
<code>
{{if .}}
</code>
to
<code>
{{end}}
</code>
executes only if the value of the current data item, called
<code>
.
</code>
(dot),
is non-empty.
That is, when the string is empty, this piece of the template is suppressed.
</p>
<p>
The snippet
<code>
0
</code>
says to process the data with the function
The snippet
<code>
{{urlquery .}}
</code>
says to process the data with the function
<code>
urlquery
</code>
, which sanitizes the query string
for safe display on the web page.
</p>
...
...
doc/effective_go.tmpl
View file @
ebf2b92e
...
...
@@ -2945,13 +2945,13 @@ from data items passed to <code>templ.Execute</code>, in this case the
form value.
Within the template text (<code>templateStr</code>),
double-brace-delimited pieces denote template actions.
The piece from the <code>{{
if .
}}</code>
to <code>{{
end}}</code> executes only if the value of the current data item, called <code>.</code>
,
The piece from the <code>{{
html "{{if .}}"
}}</code>
to <code>{{
html "{{end}}"}}</code> executes only if the value of the current data item, called <code>.</code> (dot)
,
is non-empty.
That is, when the string is empty, this piece of the template is suppressed.
</p>
<p>
The snippet <code>{{
urlquery .
}}</code> says to process the data with the function
The snippet <code>{{
html "{{urlquery .}}"
}}</code> says to process the data with the function
<code>urlquery</code>, which sanitizes the query string
for safe display on the web page.
</p>
...
...
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