What is a channel in Go?

Answer

A channel is a typed conduit for communication between goroutines, following Go's philosophy: "Do not communicate by sharing memory; instead, share memory by communicating." Create a channel with ch := make(chan int). Send a value with ch <- 42 and receive with val := <-ch. By default, channels are unbuffered — a send blocks until a receiver is ready, and vice versa. Buffered channels (make(chan int, 10)) allow up to N sends without a corresponding receive, decoupling the sender and receiver.