Defer close(channel) - Golang tutorial
Always remind yourself closing your opened channel
Like this example
valueChannel := make(chan int)
defer close(valueChannel)
this ensures that you clean up your bedroom when you are leaving it
Comments
Post a Comment