Powered by Cookiecutter, Cookiecutter Golang is a framework for jumpstarting production-ready go projects quickly.
- Generous
Makefile
with management commands - Uses
go dep
(with optional go module support requires go 1.11) - injects build time and git hash at build time.
- Can use viper for env var config
- Can use cobra for cli tools
- Can use logrus for logging
- Can create dockerfile for building go binary and dockerfile for final go binary (no code in final container)
- If docker is used adds docker management commands to makefile
- Option of TravisCI, CircleCI or None
- Uses
dep
ormod
for dependency management - Only maintained 3rd party libraries are used.
This project now uses docker multistage builds, you need at least docker version v17.05.0-ce to use the docker file in this template, you can read more about multistage builds here.
This template uses docker [multistage]](https://www.critiqus.com/post/multi-stage-docker-builds/) builds to make images slimmer and containers only the final project binary and assets with no source code whatsoever.
Apps run under non root user and also with dumb-init
Run make help
to see the available management commands, or just run make build
to build your project.
$ make help
$ make build
$ ./bin/echoserver
- iothub websocket multiroom server for IoT