Skip to content

Instantly share code, notes, and snippets.

@tilaklodha
Created September 25, 2017 00:34
Show Gist options
  • Save tilaklodha/f889f67ac9adf6fc129b074160b2d926 to your computer and use it in GitHub Desktop.
Save tilaklodha/f889f67ac9adf6fc129b074160b2d926 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
)
func main() {
ch := make(chan int, 2)
ch <- 5
ch <- 6
fmt.Println(<- ch)
fmt.Println(<- ch)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment