Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created March 9, 2021 07:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velotiotech/2a57d7a0043f6bb2de035413fad20c82 to your computer and use it in GitHub Desktop.
Save velotiotech/2a57d7a0043f6bb2de035413fad20c82 to your computer and use it in GitHub Desktop.
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