Goroutines
Goroutines
A goroutine is a lightweight thread managed by the Go runtime.
You start one with the go keyword before a function call.
Goroutines run concurrently with the rest of the program.
Channels
Goroutines communicate via channels. A channel is a typed pipe —
you send values into it with <- and receive values from it the same way.