summaryrefslogtreecommitdiff
path: root/go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-08-25 16:51:51 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-08-25 16:51:51 +0200
commitfa349bb17f2aa1c5d3c7c25b3faa1213a24d9bcd (patch)
treec9fb8e655331e256be2b36b5d5a59350b65b6f7f /go
parent8003ca68f245b75592845338edcdd4990a0fa70b (diff)
Cleanup
Diffstat (limited to 'go')
-rw-r--r--go/food-chain/food_chain.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/go/food-chain/food_chain.go b/go/food-chain/food_chain.go
index 9e5494d..c42ebbc 100644
--- a/go/food-chain/food_chain.go
+++ b/go/food-chain/food_chain.go
@@ -9,8 +9,7 @@ import (
const testVersion = 2
const lyrics = `I know an old lady who swallowed a {{.Animal}}.
-{{- if eq .Animal "fly"}}
-{{- else if eq .Animal "spider"}}
+{{- if eq .Animal "spider"}}
It wriggled and jiggled and tickled inside her.
{{- else if eq .Animal "bird"}}
How absurd to swallow a bird!
@@ -24,9 +23,8 @@ Just opened her throat and swallowed a goat!
I don't know how she swallowed a cow!
{{- end}}
{{- range .Animals}}
-She swallowed the {{.A}} to catch the {{if eq .B "spider" -}}
-spider that wriggled and jiggled and tickled inside her{{else -}}
-{{.B}}{{end}}.{{end}}
+She swallowed the {{.A}} to catch the {{.B}}{{if eq .B "spider"}} that wriggled and jiggled and tickled inside her{{end}}.
+{{- end}}
{{- if eq .Animal "horse"}}
She's dead, of course!
{{- else}}
@@ -34,7 +32,6 @@ I don't know why she swallowed the fly. Perhaps she'll die.
{{- end}}`
var animals = []string{
- //"horse", "cow", "goat", "dog", "cat", "bird", "spider", "fly",
"fly", "spider", "bird", "cat", "dog", "goat", "cow", "horse",
}