You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
195 B
19 lines
195 B
12 years ago
|
package main
|
||
|
|
||
|
import (
|
||
12 years ago
|
"fmt"
|
||
|
"time"
|
||
12 years ago
|
)
|
||
|
|
||
|
func say(s string) {
|
||
12 years ago
|
for i := 0; i < 5; i++ {
|
||
|
time.Sleep(100 * time.Millisecond)
|
||
|
fmt.Println(s)
|
||
|
}
|
||
12 years ago
|
}
|
||
|
|
||
|
func main() {
|
||
12 years ago
|
go say("world")
|
||
|
say("hello")
|
||
12 years ago
|
}
|