In Chapter 10, Compile Time Evaluations in Go, we discussed some Go build optimizations that can potentially help optimize our build strategy. Go's build system has quite a few options that can help the system operator add additional parameterization to their build strategy.
The Go tool has many different methodologies for building our source code. Let's investigate top-level understandings of each, and then we will discuss each package in more depth. Knowing the key differences between these commands may help you to understand how they interplay with one another and choose the right tool for the job. Let's have a look at them:
- go build: Builds a binary for your project, compiling packages and dependencies
- go clean: Removes object and cached files from package source directories
- go get: Downloads and installs packages and their dependencies...