The channel ch needs a buffer size of 1. If it were an unbuffered channel and the response took more than timeoutInSeconds, the channel send statement [e.g. ch <- g.Location()] would block forever as there is no receiver anymore. The sending goroutine would never be destroyed by the garbage collector. See: https://github.com/golang/go/wiki/Timeouts
The channel ch needs a buffer size of 1. If it were an unbuffered
channel and the response took more than timeoutInSeconds, the channel
send statement [e.g. ch <- g.Location()] would block forever as there
is no receiver anymore. The sending goroutine would never be
destroyed by the garbage collector.
See: https://github.com/golang/go/wiki/Timeouts

codingsince1985/geo-golang