chan keyword in Go

In Go, the chan keyword is used to define a channel. The make keyword is used to create it, along with the type of data that the channel can hold. You can indicate the sending or receiving of data on the channel by using the operator <- before or after the variable name of the channel.
<pre><code>package main
import "fmt"

func send(v int, c chan int) {
	c <- v
}

func main() {
	c := make(chan int)
	go send(2, c)
	x := <-c

	fmt.Println(x)
}
</code></pre>