Range

Range iterates over each element sent to the channel as it is received from the queue.


for value := range myChannel {...}
                        

The range will stop iterating the moment the channel is closed, using the Close() function.

range.go