You don't have to close a channel in Go and in many cases you actually shouldn't.
Even if you choose to close a channel because it's useful to you, it's not necessarily shared state. In a lot of cases, closing a channel behaves just like a message in its queue.
Comments
You don't have to close a channel in Go and in many cases you actually shouldn't.
Even if you choose to close a channel because it's useful to you, it's not necessarily shared state. In a lot of cases, closing a channel behaves just like a message in its queue.