Skip to content

Instantly share code, notes, and snippets.

@angrypie
Last active April 5, 2016 21:36
Show Gist options
  • Save angrypie/77902e2740c34e822d4102e271627db6 to your computer and use it in GitHub Desktop.
Save angrypie/77902e2740c34e822d4102e271627db6 to your computer and use it in GitHub Desktop.
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