Go - buffered channel Declare a queue: ch := make(chan int, 3) Block send when full, block receive when empty Get capacity: cap(ch) Get currently buffered: len(ch) Buffered channel behaves as a queue, but should use slice if only need a queue Share on X Facebook LinkedIn Bluesky Previous Next