Channels in Go

From the Go cheat sheet · Concurrency · verified Jul 2026

Channels

Communication between goroutines

go
// Create channel
ch := make(chan int)

// Send to channel
ch <- 42

// Receive from channel
value := <-ch

// Buffered channel
ch := make(chan int, 100)
📡 Channels for goroutine communication
🔄 Buffered vs unbuffered channels
🎯 select for multiplexing channel operations
⏱️ Timeouts with time.After()

More Go tasks

Back to the full Go cheat sheet