Go: Channel Cheat Sheet

Creating a Channel

Syntax:

var Channel_name chan Type

Or you can also create a channel using make() function

channel_name:= make(chan Type)

Closing a Channel

close(channelname)

Leave a Reply

Your email address will not be published. Required fields are marked *