From 1cd3f670bed35eb309d7059dc2509bdbe3b7087d Mon Sep 17 00:00:00 2001 From: "R. S. Doiel" Date: Thu, 4 Aug 2016 10:52:04 -0700 Subject: [PATCH] quick save --- README.md | 6 +++--- index.html | 6 +++--- testdata/myformletter.template | 7 ++++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index cb03d10..3f1cd45 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/index.html b/index.html index d10190d..a197c38 100644 --- a/index.html +++ b/index.html @@ -23,10 +23,10 @@

mkpage

Hello {{.name -}}, - The weather forcast + Forecast: {{range .weather.data.text}} - {{ . }} + + {{ . }} {{end}} Thank you @@ -39,7 +39,7 @@

mkpage

diff --git a/testdata/myformletter.template b/testdata/myformletter.template index 9d11ab0..5f8ee9f 100644 --- a/testdata/myformletter.template +++ b/testdata/myformletter.template @@ -2,9 +2,10 @@ Date: {{.now}} Hello {{.name -}}, -The current weather is - -{{.weather}} +The weather forecast: +{{ range .weather.data.text}} + + {{ . -}} +{{end}} Thank you