Speeding up compilation and testing cycles
There are a few reasons why an application might be slow to compile, and by extension, run tests against. Usually, this is a combination requiring the application to compile from scratch every time (no intermediate builds), large code bases, and many dependencies. This recipe will explore some tools that can be used to look at the current dependency lists and to speed up compilation.
Getting ready
Configure your environment by performing the following steps:
- Download and install Go on your operating system from https://golang.org/doc/install and configure your
GOPATH
environment variable. - Open a terminal/console application.
- Navigate to your
GOPATH/src
directory and create a project directory, for example,$GOPATH/src/github.com/yourusername/customrepo
.
All code will be run and modified from this directory.
- Optionally, install the latest tested version of the code using the
go get github.com/agtorre/go-cookbook/
command.
How to do it...
These steps cover...