Range and Close
Explore how to use the range function to receive values from channels until they are closed by the sender. Understand why only the sender should close channels to avoid panics. This lesson helps you implement this basic concurrency pattern properly before moving on to more advanced loops.
We'll cover the following...
We'll cover the following...
If you remember the lesson on channels, you are already familiar with this pattern.
In Go, we have a range function which lets us iterate over elements in different data ...