Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Playing with Go channels
package main
import "fmt"
func main() {
messages := make(chan string)
return_messages := make(chan string)
go func() { return_messages <- "ping" }()
go func() {
r_msg := <-return_messages
messages <- r_msg
msg := <-messages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.