- Head over to https://golang.org/doc/install
- Follow instructions for your operating system
Collection of Packages in a go application and is defined by a go.mod file at the root. Modules are created using the command:
go mod init <module_name>
Go routines are what go uses for its concurrency model. The main function can also be thought of as the (main) Go routine which in turn spawns other go routines in the application.
Channels are what go routines use to communicate and pass messages between each other.
Channel are created with the following syntax:
channel := make(chan int, 10)
First variable takes a chan keyword and type of data (int in this case) that is passed over the channel. The data type can be base types such as int, float, string or user defined struct types.
Second parameter is optional and defines a buffer which is the count of values that can be stored in a channel until a go routine reads from that channel. A channel can accept values from goroutine as long as there is room in buffer for that channel.
Golang blog
Go concepts
Go Proverbs
Goroutines
How docker is built in go