blob: 747ea477c8491caa7d8e47c552c435798e7b0fef [file] [log] [blame]
// +build ignore,OMIT
package main
import (
"fmt"
"time"
)
// STARTMAIN1 OMIT
type Ball struct{ hits int }
func main() {
go player("ping", new(Ball)) // HL
time.Sleep(1 * time.Second)
}
func player(name string, ball *Ball) {
for i := 0; ; i++ {
ball.hits++
fmt.Println(name, i, "hit", ball.hits)
time.Sleep(100 * time.Millisecond)
}
}
// STOPMAIN1 OMIT