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
Get hands-on with 1200+ tech skills courses.