// Chapter 36 example: main and a goroutine take turns printing. // Run with: go run exercises/36/03-two-at-once.go package main import ( "fmt" "time" ) func count(name string) { for i := 1; i <= 3; i++ { fmt.Println(name, i) time.Sleep(100 * time.Millisecond) } } func main() { go count("goroutine") count("main") }