https://github.com/matt-riley/go-api-template
Minimal Go API template with Chi, Docker, CI, and GHCR publishing.
https://github.com/matt-riley/go-api-template
chi docker go rest-api template
Last synced: about 9 hours ago
JSON representation
Minimal Go API template with Chi, Docker, CI, and GHCR publishing.
- Host: GitHub
- URL: https://github.com/matt-riley/go-api-template
- Owner: matt-riley
- License: mit
- Created: 2026-02-26T20:58:20.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-06-26T14:04:04.000Z (10 days ago)
- Last Synced: 2026-06-26T15:21:29.356Z (10 days ago)
- Topics: chi, docker, go, rest-api, template
- Language: Go
- Size: 16.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# go-api-template
A minimal Go API template using [Chi](https://github.com/go-chi/chi).
## Features
- Chi router with structured logging and panic recovery
- Health check at `/health`
- Graceful shutdown
- Multi-stage Docker build (distroless)
- CI via shared workflows: test, lint (golangci-lint), security (govulncheck)
- Docker image published to GHCR on tags
## Getting started
```bash
# Run locally
make dev
# Run tests
make test
# Build
make build
# Build Docker image
docker build -t go-api-template .
```
## Endpoints
| Method | Path | Description |
| ------ | ---------- | -------------------- |
| GET | `/health` | Health check |
| GET | `/api/v1/` | Hello World endpoint |
## Configuration
| Variable | Default | Description |
| -------- | ------- | ----------- |
| `PORT` | `8080` | Server port |