gobyexample/034-goroutines/goroutines.go
Mark McGranaghan 618dec4fae updates
2012-09-23 12:53:50 -07:00

18 lines
204 B
Go

// ## Goroutines
package main
import "fmt"
func f(n int) {
for i := 0; i < 10; i++ {
fmt.Println(n, ":", i)
}
}
func main() {
go f(0)
var input string
fmt.Scanln(&input)
}