Is it OK to leave a Go channel open forever (never close the channel) if I never check for its state? Will it lead to memory leaks? Is the following code OK?
Go is garbage collected, so you don't really have to 'free' anything.
There is possibility to close channels, but it's mostly used as - close(channel) - tell the goroutine (or main program) that nothing else will be sent on that channel.