Skip to content

Commit a2a37a8

Browse files
committed
Merge branch 'main' into first-development
2 parents 8c90c97 + 8089058 commit a2a37a8

File tree

6 files changed

+72
-12
lines changed

6 files changed

+72
-12
lines changed

.github/dependabot.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
version: 2
2+
updates:
3+
# Go dependencies (modules)
4+
- package-ecosystem: "gomod"
5+
directory: "/" # Location of go.mod and go.sum
6+
schedule:
7+
interval: "weekly"
8+
open-pull-requests-limit: 10
9+
labels:
10+
- "dependencies"
11+
- "go"
12+
commit-message:
13+
prefix: "chore(deps)"
14+
include: "scope"
15+
16+
# Docker dependencies (Dockerfile)
17+
- package-ecosystem: "docker"
18+
directory: "/" # Location of Dockerfile
19+
schedule:
20+
interval: "weekly"
21+
labels:
22+
- "dependencies"
23+
- "docker"
24+
commit-message:
25+
prefix: "chore(docker)"
26+
include: "scope"
27+
28+
# GitHub Actions dependencies
29+
- package-ecosystem: "github-actions"
30+
directory: "/" # Location of GitHub workflows
31+
schedule:
32+
interval: "weekly"
33+
labels:
34+
- "dependencies"
35+
- "github-actions"
36+
commit-message:
37+
prefix: "chore(actions)"
38+
include: "scope"

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: actions/checkout@v4
1818

1919
- name: Set up Go
20-
uses: actions/setup-go@v4
20+
uses: actions/setup-go@v5
2121
with:
2222
go-version: '1.21'
2323

CONTRIBUTING.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Contributing to Golang REST API Microservice Template
2+
3+
Welcome! 🎉 Thank you for considering contributing to this project.
4+
We appreciate your time and effort to help improve this microservice.
5+
6+
## 🚀 Getting Started
7+
8+
### **1. Fork the Repository**
9+
Click the "Fork" button at the top-right corner of this repository to create your own copy.
10+
11+
### **2. Clone Your Fork**
12+
```sh
13+
git clone https://github.com/MitulShah1/golang-rest-api-template.git
14+
cd golang-rest-api-template
15+
```
16+
### **3. Set Up Upstream (Optional)**
17+
```sh
18+
git remote add upstream https://github.com/MitulShah1/golang-rest-api-template.git
19+
git fetch upstream
20+
git merge upstream/main
21+
```
22+
23+

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# golang-rest-api-template
22
[![license](https://img.shields.io/badge/license-MIT-green)](https://raw.githubusercontent.com/MitulShah1/golang-rest-api-template/main/LICENSE)
33
[![build](https://github.com/MitulShah1/golang-rest-api-template//actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/MitulShah1/golang-rest-api-template/actions/workflows/go.yml)
4+
[![codecov](https://codecov.io/github/MitulShah1/golang-rest-api-template/graph/badge.svg?token=88JSRODXSS)](https://codecov.io/github/MitulShah1/golang-rest-api-template)
45

56
## Overview
67
This is a template for building production-ready and easily extendible REST API using Go. It follows best practices and includes a standardized project structure with all necessary components for building scalable microservices.

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ require (
66
github.com/DATA-DOG/go-sqlmock v1.5.2
77
github.com/Masterminds/squirrel v1.5.4
88
github.com/go-playground/validator/v10 v10.25.0
9-
github.com/go-sql-driver/mysql v1.8.1
9+
github.com/go-sql-driver/mysql v1.9.1
1010
github.com/gorilla/mux v1.8.1
1111
github.com/jmoiron/sqlx v1.4.0
1212
github.com/joho/godotenv v1.5.1
13-
github.com/stretchr/testify v1.8.4
13+
github.com/stretchr/testify v1.10.0
1414
github.com/swaggo/http-swagger/v2 v2.0.2
1515
github.com/swaggo/swag v1.16.4
1616
go.uber.org/zap v1.27.0
@@ -33,7 +33,7 @@ require (
3333
github.com/leodido/go-urn v1.4.0 // indirect
3434
github.com/mailru/easyjson v0.7.6 // indirect
3535
github.com/pmezard/go-difflib v1.0.0 // indirect
36-
github.com/stretchr/objx v0.5.0 // indirect
36+
github.com/stretchr/objx v0.5.2 // indirect
3737
github.com/swaggo/files/v2 v2.0.0 // indirect
3838
go.uber.org/multierr v1.10.0 // indirect
3939
golang.org/x/crypto v0.32.0 // indirect

go.sum

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn
3030
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
3131
github.com/go-playground/validator/v10 v10.25.0 h1:5Dh7cjvzR7BRZadnsVOzPhWsrwUr0nmsZJxEAnFLNO8=
3232
github.com/go-playground/validator/v10 v10.25.0/go.mod h1:GGzBIJMuE98Ic/kJsBXbz1x/7cByt++cQ+YOuDM5wus=
33-
github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y=
3433
github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
34+
github.com/go-sql-driver/mysql v1.9.1 h1:FrjNGn/BsJQjVRuSa8CBrM5BWA9BWoXXat3KrtSb/iI=
35+
github.com/go-sql-driver/mysql v1.9.1/go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU=
3536
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
3637
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
3738
github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o=
@@ -65,16 +66,13 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA
6566
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
6667
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
6768
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
68-
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
69-
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
70-
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
69+
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
70+
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
7171
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
7272
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
7373
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
74-
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
75-
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
76-
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
77-
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
74+
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
75+
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
7876
github.com/swaggo/files/v2 v2.0.0 h1:hmAt8Dkynw7Ssz46F6pn8ok6YmGZqHSVLZ+HQM7i0kw=
7977
github.com/swaggo/files/v2 v2.0.0/go.mod h1:24kk2Y9NYEJ5lHuCra6iVwkMjIekMCaFq/0JQj66kyM=
8078
github.com/swaggo/http-swagger/v2 v2.0.2 h1:FKCdLsl+sFCx60KFsyM0rDarwiUSZ8DqbfSyIKC9OBg=

0 commit comments

Comments
 (0)