This is a template for a gin application.
The following features have already been implemented to simplify the initialization of a new project:
- Project Structure
- Dockerfile
- Makefile
- Gin Server
- Config Management (viper)
- GoReleaser (GitHub Actions)
- API Documentation (swag)
- Access Logs, Request ID
- Health Check (tavsec/gin-healthcheck)
- Database Connection
- Logging (uber-go/zap)
- i18n Support
- Run as Script
- Observability
- Graceful Shutdown (gin-contrib/graceful)
- Click on the green "Use this template" button
- Click on "Create a new repository"
- Input a name for your new repository, then click on "Create repository"
- Install gonew:
go install golang.org/x/tools/cmd/gonew@latest - Open a terminal and run
gonew github.com/LeslieLeung/gin-application-template github.com/<your-username>/<your-repo-name>
make run: Run the applicationmake swag: Generate API documentationmake dry-build: Compile the application