Is there a foreach loop in Go?
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: If you don’t care about the index, you can use _: The … Read more