Golang newbie here.
Is there a functional difference between
func randomNumberGenerator() <-chan int {
and
func randomNumberGenerator() chan int {
I've tried using both and they seem to work fine for me.
I've seen the former used by Rob Pike (one of Go creators) in his Go Concurrency Patterns talk at Google IO 2012. I've also seen it used in Go's official website. Why add 2 extra characters ("<-") when you can omit it? I've tried looking for the difference on the web, but couldn't find it.