You can do it without a goroutine as long as the channel has at least one buffer slot so execution passes to the select and uses the data.
-- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/b713e498-fdba-41f6-90ec-71c7845a5398%40googlegroups.com.