go-examples/sandbox/main.go
2017-07-08 14:54:39 +02:00

18 lines
203 B
Go

package main
import "fmt"
import "sync"
var wg sync.WaitGroup
func main() {
for i := 0; i < 5; i++ {
go func() {
defer wg.Done()
wg.Add(1)
fmt.Println("Hello World")
}()
}
wg.Wait()
}