by styluss · 2y ago · 0 comments
If ok is false, the channel is closed and data is a zero value.
You do need to use either two channels (horrible code) or some kind of Result{T,error} wrapper (bad language design).
I like sync primitives and good old collections.
It gets overly verbose because of "simplicity"