Skip to content

Commit e0a140a

Browse files
Merge pull request Game-as-a-Service#113 from KazeNoYumeX/feature/chore-update-dependencies-optimize-imports
Chore: Upgrade the Go version from v1.21 to v1.22
2 parents 6d1c19f + f1f4728 commit e0a140a

22 files changed

+186
-164
lines changed

.github/workflows/test-go-unit.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- .github/workflows/test-go-unit.yml
1212

1313
env:
14-
GO_VERSION: 1.21
14+
GO_VERSION: 1.22
1515

1616
jobs:
1717
build:

Backend/cmd/app/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import (
44
_ "github.com/Game-as-a-Service/The-Message/cmd/app/docs"
55
"github.com/Game-as-a-Service/The-Message/config"
6-
http "github.com/Game-as-a-Service/The-Message/service/delivery/http/v1"
6+
"github.com/Game-as-a-Service/The-Message/service/delivery/http/v1"
77
mysqlRepo "github.com/Game-as-a-Service/The-Message/service/repository/mysql"
88
"github.com/Game-as-a-Service/The-Message/service/service"
99
"github.com/gin-gonic/gin"

Backend/cmd/migrate/migrate.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ package main
44

55
import (
66
"fmt"
7-
"github.com/Game-as-a-Service/The-Message/config"
87
"net/url"
8+
9+
"github.com/Game-as-a-Service/The-Message/config"
910
)
1011

1112
func main() {

Backend/cmd/migrate/rollback.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ package main
44

55
import (
66
"fmt"
7-
"github.com/Game-as-a-Service/The-Message/config"
87
"net/url"
8+
9+
"github.com/Game-as-a-Service/The-Message/config"
910
)
1011

1112
func main() {

Backend/config/config.go

-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
package config
2-
3-

Backend/config/database.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ package config
22

33
import (
44
"fmt"
5-
"gorm.io/driver/mysql"
6-
"gorm.io/gorm"
75
"log"
86
"net/url"
97
"os"
8+
9+
"gorm.io/driver/mysql"
10+
"gorm.io/gorm"
1011
)
1112

1213
func NewDatabase() *gorm.DB {

Backend/config/migration.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ package config
33
import (
44
"database/sql"
55
"fmt"
6+
"net/url"
7+
"os"
8+
"strings"
9+
610
_ "github.com/go-sql-driver/mysql"
711
"github.com/golang-migrate/migrate/v4"
812
"github.com/golang-migrate/migrate/v4/database/mysql"
913
_ "github.com/golang-migrate/migrate/v4/source/file"
1014
_ "github.com/joho/godotenv/autoload"
11-
"net/url"
12-
"os"
13-
"strings"
1415
)
1516

1617
func NewMigration(dsn string, sourceURL string) (*migrate.Migrate, error) {

Backend/config/test_database.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ package config
22

33
import (
44
"fmt"
5-
"github.com/joho/godotenv"
6-
"gorm.io/gorm"
75
"log"
86
"os"
7+
8+
"github.com/joho/godotenv"
9+
"gorm.io/gorm"
910
)
1011

1112
func InitTestDB() *gorm.DB {

Backend/go.mod

+32-34
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,61 @@
11
module github.com/Game-as-a-Service/The-Message
22

3-
go 1.21
3+
go 1.22
44

55
require (
6-
github.com/bxcodec/faker/v3 v3.8.1
76
github.com/gin-gonic/gin v1.9.1
8-
github.com/golang-migrate/migrate/v4 v4.16.2
7+
github.com/go-faker/faker/v4 v4.3.0
8+
github.com/go-sql-driver/mysql v1.7.1
9+
github.com/golang-migrate/migrate/v4 v4.17.0
910
github.com/joho/godotenv v1.5.1
10-
github.com/stretchr/testify v1.8.3
11+
github.com/stretchr/testify v1.8.4
1112
github.com/swaggo/files v1.0.1
1213
github.com/swaggo/gin-swagger v1.6.0
13-
github.com/swaggo/swag v1.16.2
14-
gorm.io/driver/mysql v1.5.1
15-
gorm.io/gorm v1.25.4
14+
github.com/swaggo/swag v1.16.3
15+
gorm.io/driver/mysql v1.5.4
16+
gorm.io/gorm v1.25.7
1617
)
1718

1819
require (
1920
github.com/KyleBanks/depth v1.2.1 // indirect
20-
github.com/PuerkitoBio/purell v1.1.1 // indirect
21-
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
22-
github.com/bytedance/sonic v1.9.1 // indirect
23-
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
21+
github.com/bytedance/sonic v1.10.2 // indirect
22+
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
23+
github.com/chenzhuoyu/iasm v0.9.1 // indirect
2424
github.com/davecgh/go-spew v1.1.1 // indirect
25-
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
25+
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
2626
github.com/gin-contrib/sse v0.1.0 // indirect
27-
github.com/go-openapi/jsonpointer v0.19.5 // indirect
28-
github.com/go-openapi/jsonreference v0.19.6 // indirect
29-
github.com/go-openapi/spec v0.20.4 // indirect
30-
github.com/go-openapi/swag v0.19.15 // indirect
27+
github.com/go-openapi/jsonpointer v0.20.2 // indirect
28+
github.com/go-openapi/jsonreference v0.20.4 // indirect
29+
github.com/go-openapi/spec v0.20.14 // indirect
30+
github.com/go-openapi/swag v0.22.9 // indirect
3131
github.com/go-playground/locales v0.14.1 // indirect
3232
github.com/go-playground/universal-translator v0.18.1 // indirect
33-
github.com/go-playground/validator/v10 v10.14.0 // indirect
34-
github.com/go-sql-driver/mysql v1.7.1 // indirect
33+
github.com/go-playground/validator/v10 v10.18.0 // indirect
3534
github.com/goccy/go-json v0.10.2 // indirect
35+
github.com/google/go-cmp v0.6.0 // indirect
3636
github.com/hashicorp/errwrap v1.1.0 // indirect
3737
github.com/hashicorp/go-multierror v1.1.1 // indirect
3838
github.com/jinzhu/inflection v1.0.0 // indirect
3939
github.com/jinzhu/now v1.1.5 // indirect
4040
github.com/josharian/intern v1.0.0 // indirect
4141
github.com/json-iterator/go v1.1.12 // indirect
42-
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
43-
github.com/leodido/go-urn v1.2.4 // indirect
44-
github.com/mailru/easyjson v0.7.6 // indirect
45-
github.com/mattes/migrate v3.0.1+incompatible // indirect
46-
github.com/mattn/go-isatty v0.0.19 // indirect
42+
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
43+
github.com/leodido/go-urn v1.4.0 // indirect
44+
github.com/mailru/easyjson v0.7.7 // indirect
45+
github.com/mattn/go-isatty v0.0.20 // indirect
4746
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4847
github.com/modern-go/reflect2 v1.0.2 // indirect
49-
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
48+
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
5049
github.com/pmezard/go-difflib v1.0.0 // indirect
5150
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
52-
github.com/ugorji/go/codec v1.2.11 // indirect
53-
go.uber.org/atomic v1.7.0 // indirect
54-
golang.org/x/arch v0.3.0 // indirect
55-
golang.org/x/crypto v0.14.0 // indirect
56-
golang.org/x/net v0.17.0 // indirect
57-
golang.org/x/sys v0.13.0 // indirect
58-
golang.org/x/text v0.13.0 // indirect
59-
golang.org/x/tools v0.9.1 // indirect
60-
google.golang.org/protobuf v1.30.0 // indirect
61-
gopkg.in/yaml.v2 v2.4.0 // indirect
51+
github.com/ugorji/go/codec v1.2.12 // indirect
52+
go.uber.org/atomic v1.11.0 // indirect
53+
golang.org/x/arch v0.7.0 // indirect
54+
golang.org/x/crypto v0.19.0 // indirect
55+
golang.org/x/net v0.21.0 // indirect
56+
golang.org/x/sys v0.17.0 // indirect
57+
golang.org/x/text v0.14.0 // indirect
58+
golang.org/x/tools v0.18.0 // indirect
59+
google.golang.org/protobuf v1.32.0 // indirect
6260
gopkg.in/yaml.v3 v3.0.1 // indirect
6361
)

0 commit comments

Comments
 (0)