Skip to content

Glossary: Go Beyond the Basics

for range over a channel

Also written: range over a channel, for range

`for v := range ch` receives values from a channel until it is closed and empty. With no variable, `for range n` just repeats `n` times.

Where the book teaches it

Related terms

closechannel