In [1]:
import "fmt"
In [2]:
world := "world"
Out[2]:
In [3]:
fmt.Sprintf("hello %s", world)
Out[3]:
Here is a simple example of a channel.
In [4]:
messages := make(chan string)
Out[4]:
In [5]:
go func() { messages <- "ping" }()
In [6]:
msg := <- messages
Out[6]: