Close

Close() is a built-in function that can be used to close a channel. Closing a channel means that we can no longer send data to the channel.


close(myChannel)
                        

The channel is usually closed when all data has been sent and there is no more data to send.

closing.go