March 2020
Intermediate to advanced
406 pages
8h 39m
English
In this chapter, we've discussed a couple of ways to optimize the runtime for Go builds. We also have the ability to improve Go build times with a couple of simple tweaks. Go's team has been optimizing for runtime, not for build time. Go has the ability to cache build time dependencies, which helps to reuse common artifacts from previous builds. These artifacts are kept in $GOPATH/pkg/. We can keep these intermediate results by using the -i flag while calling go build in order to reutilize those artifacts. If we want to debug what is happening during our build, we can run our build with a -x flag in order to produce a more verbose output from the Go build system.
Read now
Unlock full access