Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leslieleung/gin-application-template
A template for gin application.
https://github.com/leslieleung/gin-application-template
gin gin-template template
Last synced: about 1 month ago
JSON representation
A template for gin application.
- Host: GitHub
- URL: https://github.com/leslieleung/gin-application-template
- Owner: LeslieLeung
- License: agpl-3.0
- Created: 2023-10-08T13:31:52.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-09T10:52:19.000Z (4 months ago)
- Last Synced: 2024-09-09T12:56:35.649Z (4 months ago)
- Topics: gin, gin-template, template
- Language: Go
- Homepage:
- Size: 156 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gin-application-template
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=LeslieLeung_gin-application-template&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=LeslieLeung_gin-application-template)
## Description
This is a template for a gin application.
The following features have already been implemented to simplify the initialization of a new project:
- [x] Project Structure
- [x] Dockerfile
- [x] Makefile
- [x] [Gin](https://github.com/gin-gonic/gin) Server
- [x] Config Management ([viper](https://github.com/spf13/viper))
- [x] [GoReleaser](https://goreleaser.com/) (GitHub Actions)
- [x] API Documentation ([swag](https://github.com/swaggo/swag))
- [x] Access Logs, Request ID
- [x] Health Check ([tavsec/gin-healthcheck](https://github.com/tavsec/gin-healthcheck))
- [x] Database Connection
- [x] Logging ([uber-go/zap](https://github.com/uber-go/zap))
- [ ] i18n Support
- [ ] Run as Script
- [ ] Observability
- [x] Graceful Shutdown ([gin-contrib/graceful](https://github.com/gin-contrib/graceful))## Usage
### GitHub Template
1. Click on the green "Use this template" button
2. Click on "Create a new repository"
3. Input a name for your new repository, then click on "Create repository"### gonew
1. Install gonew: `go install golang.org/x/tools/cmd/gonew@latest`
2. Open a terminal and run `gonew github.com/LeslieLeung/gin-application-template github.com//`## Useful Make Commands
- `make run`: Run the application
- `make swag`: Generate API documentation
- `make dry-build`: Compile the application