Last active
April 5, 2016 21:36
-
-
Save angrypie/77902e2740c34e822d4102e271627db6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "fmt" | |
func main() { | |
queue := make(chan struct {string; int}) | |
go sendPair(queue) | |
pair := <-queue | |
fmt.Println(pair.string, pair.int) | |
} | |
func sendPair(queue chan struct {string; int}) { | |
queue <- struct {string; int}{"http:...", 3} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment