Read or watch Go basics to understand Go workspace and find out how to import other packages. Then continue with Effective Go.
Install Go using the official installation package or on MacOS using Homebrew brew install go
.
GOPATH
is set by default to $HOME/go
.
VS Code works great with Go, just make sure you have the Go extension installed.
- Effective go
- Use
make
for slices, maps, and channels. It initialize the memory. - Use
new
or composite literals for everything else. It zeores the memory.