(PCC)::[How-to-make-a-channel-of-strings-buffering-up-to-2-values-in-go-language]::[go]
package main import "fmt" func main() { messages := make(chan string, 2) messages <- "buffered" messages <- "channel" fmt.Println(<-messages) fmt.Println(<-messages) }