Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created March 9, 2021 07:06
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
func main() {
fmt.Println("Main started...")
//create channel of int
c := make(chan int)
// call to goroutine
go printChannelData(c)
// put the data in channel
c <- 10
fmt.Println("Main ended...")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment