Last Updated: May 22, 2026
A channel value in Go can be tagged with a direction. The type chan<- T says "you can only send into this channel" and <-chan T says "you can only receive from it". Plain chan T lets you do both. Direction-restricted types are a compile-time tool that lets a function signature spell out exactly what it intends to do with the channel, and the compiler enforces it.