Is there a foreach loop in Go?
From For statements with range clause: A “for” statement with a “range” clause iterates through all entries of an array, slice, string or map, or values received on a channel. For each entry it assigns iteration values to corresponding iteration variables and then executes the block. As an example: for index, element := range someSlice … Read more