Skip to content

Comment on How I Learned to Stop Worrying and Love Golangparent

Comments

Yeah, "ok" here really signals whether or not the channel is closed. It will still block unless c is buffered.

There are actually a number of other errors in this post, unfortunately, even though I agree with the general conclusion.

"<-c", regardless of what's on the left side of it will block in every case until there's a messages available in the channel (note that close is a message).

I just notice this section has been removed. I'll be less angry now. :)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.