Skip to content
This repository has been archived by the owner on Jun 27, 2020. It is now read-only.

Commit

Permalink
quick save
Browse files Browse the repository at this point in the history
rsdoiel committed Aug 4, 2016

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent e9942ad commit 1cd3f67
Showing 3 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -15,10 +15,10 @@ filename or URL for a data source. Here's a simple example of a form letter
Hello {{.name -}},
The weather forcast
Forecast:
{{range .weather.data.text}}
{{ . }}
+ {{ . }}
{{end}}
Thank you
@@ -30,7 +30,7 @@ Render the template above (i.e. myformletter.template) would be accomplished fro
data sources--

+ "now" and "name" are strings
+ "weather" comes from a URL
+ "weather" comes from a URL of JSON content
+ "signature" comes from a file in our local disc

That would be expressed on the command line as follows
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
@@ -23,10 +23,10 @@ <h1>mkpage</h1>

Hello {{.name -}},

The weather forcast
Forecast:

{{range .weather.data.text}}
{{ . }}
+ {{ . }}
{{end}}

Thank you
@@ -39,7 +39,7 @@ <h1>mkpage</h1>

<ul>
<li>&ldquo;now&rdquo; and &ldquo;name&rdquo; are strings</li>
<li>&ldquo;weather&rdquo; comes from a URL</li>
<li>&ldquo;weather&rdquo; comes from a URL of JSON content</li>
<li>&ldquo;signature&rdquo; comes from a file in our local disc</li>
</ul>

7 changes: 4 additions & 3 deletions testdata/myformletter.template
Original file line number Diff line number Diff line change
@@ -2,9 +2,10 @@ Date: {{.now}}

Hello {{.name -}},

The current weather is

{{.weather}}
The weather forecast:
{{ range .weather.data.text}}
+ {{ . -}}
{{end}}

Thank you

0 comments on commit 1cd3f67

Please sign in to comment.