summaryrefslogtreecommitdiff
path: root/go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-08-25 16:48:58 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-08-25 16:48:58 +0200
commit8003ca68f245b75592845338edcdd4990a0fa70b (patch)
tree99bbc0497c392a66a6e555cd5345470cae772a24 /go
parente22b1b7c916e4339fda61c6a91f6f1f10778894a (diff)
Test passed
Diffstat (limited to 'go')
-rw-r--r--go/food-chain/food_chain.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/go/food-chain/food_chain.go b/go/food-chain/food_chain.go
index 2d67835..9e5494d 100644
--- a/go/food-chain/food_chain.go
+++ b/go/food-chain/food_chain.go
@@ -67,8 +67,8 @@ func Verse(n int) string {
}
func Verses(from, to int) string {
- buf := make([]string, to-from)
- for i := 0; i < to-from; i++ {
+ buf := make([]string, to-from+1)
+ for i := 0; i < to-from+1; i++ {
buf[i] = Verse(i + 1)
}
return strings.Join(buf, "\n\n")