Strange to go all this length without mentioning the approaches that solve the problem in that first example:
1. send a close message on the channel that stops the goroutine
2. use a Context instance - `ctx.Done()` returns a channel you can select on
Both are quite easy to grasp and implement.
replies(2):