go-wagen
Single binary web application generator for Go.
Creates project boilerplate and gives the ability to focus on the implementation of app functionality.
Generates:
- project layout, according to community best practices
- Makefile for wrapping project related routines
- Dockerfile and docker-compose for local development
- containers for code, tests and golangci-lint
- configuration management with viper
- logging with logrus or zap
- routing with gorilla/mux or chi
- default health check, http handler and logger middleware
go-wagen is a starter pack for typical web application.
It doesn't aim to generalize the whole project workflow, push framework, or architecture.
Consists of framework-agnostic components that are common in most of the applications.
All contributions, issues, requests or feedback are warmly welcome.
Installation
Install pre-built binary on releases page:
curl
./go-wagen --path=/absoule/path/to/project
or build from source code:
git clone https://github.com/groovili/go-wagen && cd go-wagen
make install
- will install packr to wrap templates to binary
make build
./go-wagen --path=/absoule/path/to/project
Binary doesn't need to be in $GOPATH
and works without any dependencies.
Usage
Video instruction soon will be here.
./go-wagen --path=/absoule/path/to/project
and select dependencies
cd /absoule/path/to/project
go mod vendor
make run
- will build and run container with code
make test
- to run container with tests
make lint
- to run linter for source code