This repo is a template to start a new go project. The binary generated only shows a hello world message, but it have the enough infrastucture and code to start a go project and run the tests.
How to use it
Both to build and test the project I make use of docker, using the
golang:1.7-alpine image, that will be downloaded when you build the project or run the tests for the first time, so you need permissions to run docker containers to work with the project. To build the gotemplate command run:
and it will generate the binary in
bin/amd64/gotemplate. To run the tests you should run:
and it will show the tests results on the terminal. You can cross-compile gotemplate by changing the variable ARCH in the Makefile by one of the next: