https://github.com/jd-apprentice/jd-golang
Template for my golang projects
https://github.com/jd-apprentice/jd-golang
go golang
Last synced: 25 days ago
JSON representation
Template for my golang projects
- Host: GitHub
- URL: https://github.com/jd-apprentice/jd-golang
- Owner: jd-apprentice
- License: mit
- Created: 2025-02-13T01:47:24.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-14T03:08:35.000Z (over 1 year ago)
- Last Synced: 2026-04-14T21:38:00.283Z (3 months ago)
- Topics: go, golang
- Language: Go
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# 🐳 Golang template
[](#contributors)
Golang template that includes the following features:
## 📚 Features
- ✅ Pre-commit
- ✅ CodeQL
- ✅ Sentry
- ✅ Docker
- ✅ Terraform
- ✅ Kubernetes
- ✅ GitHub Actions
- ✅ CHANGELOG
- ✅ Makefile
- ✅ CONTRIBUTE.md
## 🧰 Requirements
- Golang >= 1.23
- Docker (optional)
## 💾 Instalation
To install the project, run the following command:
```shell
git clone https://github.com/jd-apprentice/jd-golang.git
cd jd-golang
cp .env.example .env
make dev
```
Make sure to complete the `.env` file with the following information:
| Variable | Description |
| --- | --- |
| SENTRY_DSN | The Sentry DSN |
Change the default names with the following script:
```bash
mak replace
$ bash ./scripts/app_name.sh
Enter the new name: sample
Replacement completed. 🚀
```
This will replace all `app_name` with `sample` in the project.
### Run with Golang
```bash
make
```
This will build the app with golang and execute the binary.
### Run with Docker 🐳
1. Build the image manually
Remember to replace `app_name` with the name of your app.
```bash
docker build -f docker/base-x86_64.Dockerfile -t app_bin .
docker build -f docker/app.Dockerfile -t app_name .
make compose-up
```
## 🤝 Contribute
- For more information, check the [CONTRIBUTE](./CONTRIBUTE.md) file
## ✨ Contributors
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):