Skip to content

Instantly share code, notes, and snippets.

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 dumindu/193d714b0eeabe0af64a46ec635012d5 to your computer and use it in GitHub Desktop.
Save dumindu/193d714b0eeabe0af64a46ec635012d5 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
)
func main() {
ch := make(chan string)
go func() {
ch <- "Hello world!"
ch <- "Hello world!"
}()
fmt.Println(<-ch)
fmt.Println(<-ch)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment