- Clone this repository into your GOPATH.
- Run
godep restore
to get the minimal dependencies.
- Create a .env file for environment variables and drop into the project root. The godotenv package will then parse this file and set environment variables for everything contained in this file.
The Makefile provides the following:
gomkbuild
: build the application binary.gomkinstall
: install the application binary.buildstamp
: build the appication binary, and when the binary is run with the --version flag, log build date and build commit hash (default stdout).installstamp
: install the appication binary, and when the binary is run with the --version flag, log build date and build commit hash (default stdout).
gomkxbuild
: build all cross-platform binaries, usinggox
.gomkclean
: clean the project directory.vet
: rungo tool vet
on each source file.lint
: rungolint
on each source file.fmt
: rungo fmt
on the entire project.test
: rungo test
for all packages in the project.race
: rungo test
with race detection in all packages in the project.cover
: run tests with coverage report in all pkgs in the project.printvars
: print all variables defined in the Makefile.
To build the service and drop build date information, build as follows:
go build -ldflags "-X main.buildstamp `date -u '+%Y-%m-%d_%I:%M:%S%p'` -X main.githash `git rev-parse HEAD`"
Then run --version=yes
Run make test
for boring old black and white test output.
Run pride
to get nicely colorized test output.