blob: 96df122edd547816ea51e62cc52b88736dd8e301 [file] [log] [blame]
// +build ignore,OMIT
package main
import (
"fmt"
"time"
)
// STARTMAIN1 OMIT
type Ball struct{ hits int }
func main() {
player("ping", new(Ball))
}
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