Go Clean template
Clean Architecture template for Golang services
Overview
The purpose of the template is to show:
- how to organize a project and prevent it from turning into spaghetti code.
- create an easy starting point for future golang programs.
Content
Quick start
Local development:
# Install dependencies
$ go get ./...
# Build the app
$ make build
Integration tests (can be run in CI):
# Runs local travis ci via docker
$ make local-ci
Project structure
cmd
Configuration for cli arguments. Use cobra add <CMD>
to add support for more arguments.
config
Configuration. Just a skeleton right now, it can be expanded in the future if a configuration file is needed.
log
Logger built with logrus
.
version
Used to store build information including commit sha, build date, OS type, and arch.