Since the writer idiomatically owns the channel, and the reader reads until the channel is closed, It doesn't matter if you send a few more records. The Done branch eventually gets selected returning control to the outer function, which, hopefully, has some kind of deferred close on the channel. Once the reader empties the channel and the channel is closed, the reader exits.