Range and close
This lesson explains the use of range and how it can be used in closing a channel in Go
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 ...
Access this course and 1400+ top-rated courses and projects.