On 2016-06-25 22:59, Michael Soulier wrote: > I'm curious as to what I'm doing wrong with select here, and if it's > possible to do this with a goroutine like you describe.
You should not be using select in the first place. You are making things complicated for no reason whatsoever. (If I understand your intention correctly.) You should just read from os.Stdin. It will block until there is something to read (unless you did something special to set it in non-blocking mode). Check for EOF to know when to quit reading. Use a goroutine if you need to do something else while the read is blocked. If you do not need to do something else, you do not need a goroutine. Just a plain and simple read loop. Janne Snabb sn...@epipe.com -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.