an array of ten integers nums []int // a slice of any number of ints names map[int]string // a map from integer to strings ch chan int // a channel of integers ) Some concrete types: anonymous types
var mathFunc func(float64) float64 // a struct with two fields: name and age var john struct { name string age int } Some concrete types: anonymous types
"Øredev!", c) go sleepAndTalk(2*time.Second, "What's", c) go sleepAndTalk(3*time.Second, "up?", c) for i := 0; i < 4; i++ { fmt.Println(<-c) } Concurrency http://play.golang.org/p/vF515iatfl