From b3ffd1ad32e5c683d22a711a1991702efc0f4c9f Mon Sep 17 00:00:00 2001 From: Dave Redfern Date: Thu, 16 Apr 2020 13:55:34 +0100 Subject: [PATCH] Mentioning a range is equivalent to foreach (#1086) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Mentioning a range is equivelant to foreach I’m new to Go and really struggled to find this. I added this sentence so it would be searchable for other people to find. At the moment, searching for a foreach doesn’t return range and IMHO it should. * Fixed a spelling error for equivalent --- content/en/functions/range.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/functions/range.md b/content/en/functions/range.md index f80967c41..26f636d4d 100644 --- a/content/en/functions/range.md +++ b/content/en/functions/range.md @@ -20,6 +20,6 @@ draft: false aliases: [] --- -Just like in the Go programming language, Go and Hugo templates make heavy use of `range` to iterate over a map, array or slice. +Just like in the Go programming language, Go and Hugo templates make heavy use of `range` to iterate over a map, array or slice. Other templating languages use a foreach for the equivalent functionality. `range` is fundamental to templating in Hugo. (See the [Introduction to Hugo Templates](/templates/introduction/) for more examples.)