Range and close
This lesson explains the use of range and how it can be used in closing a channel in Go
We'll cover the following...
Closing a channel
A sender can close a channel to indicate that no more values will be sent. Receivers can test whether a channel has been closed by assigning a second parameter to the receive expression: after
Press + to interact
v, ok := <-ch
ok
is false if there are no more values to receive and the channel is ...