1 // expected: must be declared with exactly one result 2 package main 3 4 // A spawned function reports termination through the breaker channel spawn 5 // returns, so its one result must be that breaker - not a value. 6 func worker(in chan int32) (n int32) { 7 <-in 8 return 0 9 } 10 11 func main() { 12 ch := chan int32{} 13 done := spawn(worker, ch) 14 <-done 15 } 16