AlgoMaster Logo

Channel Directions

Last Updated: May 22, 2026

Medium Priority
10 min read

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.

Premium Content

Subscribe to unlock full access to this content and more premium articles.