for fish := range channel { fmt.Println(fish) } } func fish(channel chan<- string) { fishes := []string{"Trout", "Salmon", "Perch", "Bass"} for _, fish := range fishes { channel <- fish } close(channel) }
vs. Zombies" channel <- "Fruit Ninja" } func main() { river, appstore := make(chan string), make(chan string) go fish(river); go play(appstore) select { case fish := <-river: fmt.Println("caught a", fish) case game := <-appstore: fmt.Println("passed", game) } }
Lütke (founder, Shopify) Real-Time Web Concurrency Cloud Startup time Resilience Deploy a static binary Web Google Scale Dependency management Developer Happiness Clarity and simplicity
WYSIWYG language. That is, the code does exactly what it says on the page.” Peter Bourgon (SoundCloud)! golang.org The Go Programming Language ! godoc.org GoDoc ! gobyexample.com Go by Example (literate programming) ! nathany.com/good Go Object Oriented Design ! vimeo.com/49718712 Concurrency Is Not Parallelism ! bit.ly/goyeg Go Edmonton on Google+