Once we have come up with a method to write performant Go code, we need to ship it, validate it, and continue iterating it. The first step of this process is to deploy the new Go code. Go's code is compiled into binaries, which allows for the modular deployment of new Go code as we iterate through code development. We can push this out to one or multiple places in order to test against different environments. Doing this will allow us to optimize our code to fully utilize the throughput that will be available to us in our system.
In this chapter, we will learn all about the Go build process. We'll look at how the Go compiler builds binaries, and we'll use this knowledge to build right-sized, optimized binaries for the platform at hand. We will cover the following topics:
- Building Go binaries
- Using go clean to remove object files