I tried to play with go runtime again to seamlessly overwrite empty value returned from closed channel with custom one. Check it out https://github.com/1pkg/gotcha and my blog post https://1pkg.github.io/posts/lets_make_closed_channels_more_useful/.
I [John_Brown] highly discourage anyone to use golatch in any production code or maybe even any code at all as it’s extremely unsafe and not reliable and won’t be supported in foreseeable future.
Yes @petrus, the whole idea of the post is not the practical usefulness of my piece of code.
But rather the general ability of making such changes in go runtime directly if needed, bypassing some restrictions established in go design.