https://github.com/leslieleung/communicator
https://github.com/leslieleung/communicator
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/leslieleung/communicator
- Owner: LeslieLeung
- License: agpl-3.0
- Created: 2024-01-04T14:42:17.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-05T02:28:22.000Z (almost 2 years ago)
- Last Synced: 2025-01-21T15:23:54.110Z (9 months ago)
- Language: Go
- Size: 24.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gin-application-template
[](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