Skip to content

Commit bc9d0f3

Browse files
committed
upgrade go 1.24; add stats endpoint
1 parent a3b1833 commit bc9d0f3

File tree

5 files changed

+109
-117
lines changed

5 files changed

+109
-117
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Set up Go
2323
uses: actions/setup-go@v3
2424
with:
25-
go-version: 1.18
25+
go-version: 1.24
2626

2727
- name: Build
2828
run: CGO_ENABLED=0 go build -v -o . -x ./...

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM golang:1.16-alpine
3+
FROM golang:1.24-alpine
44

55
WORKDIR /app
66

controller/controller.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package controller
33
import (
44
"fmt"
55
"github.com/gin-gonic/gin"
6+
"github.com/semihalev/gin-stats"
67
"github.com/swimresults/start-service/service"
78
"net/http"
89
"os"
@@ -26,6 +27,9 @@ func Run() {
2627
registrationController()
2728

2829
router.GET("/actuator", actuator)
30+
router.GET("/stats", func(c *gin.Context) {
31+
c.JSON(http.StatusOK, stats.Report())
32+
})
2933

3034
err := router.Run(":" + port)
3135
if err != nil {

go.mod

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,52 @@
11
module github.com/swimresults/start-service
22

3-
go 1.18
3+
go 1.24
44

55
require (
6-
github.com/gin-gonic/gin v1.9.1
6+
github.com/gin-gonic/gin v1.10.1
7+
github.com/semihalev/gin-stats v0.0.0-20180505163755-30fdcbbd3533
78
github.com/sirupsen/logrus v1.9.3
8-
github.com/swimresults/athlete-service v0.3.0
9-
github.com/swimresults/meeting-service v0.7.1
10-
github.com/swimresults/service-core v0.6.2
9+
github.com/swimresults/athlete-service v1.6.0
10+
github.com/swimresults/meeting-service v0.8.0
11+
github.com/swimresults/service-core v0.7.0
1112
github.com/swimresults/user-service v0.1.5
12-
go.mongodb.org/mongo-driver v1.13.0
13+
go.mongodb.org/mongo-driver v1.17.4
1314
)
1415

1516
require (
16-
github.com/bytedance/sonic v1.9.1 // indirect
17-
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
18-
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
19-
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
20-
github.com/gin-contrib/sse v0.1.0 // indirect
17+
github.com/bytedance/sonic v1.13.3 // indirect
18+
github.com/bytedance/sonic/loader v0.2.4 // indirect
19+
github.com/cloudwego/base64x v0.1.5 // indirect
20+
github.com/gabriel-vasile/mimetype v1.4.9 // indirect
21+
github.com/gin-contrib/sse v1.1.0 // indirect
2122
github.com/go-playground/locales v0.14.1 // indirect
2223
github.com/go-playground/universal-translator v0.18.1 // indirect
23-
github.com/go-playground/validator/v10 v10.14.0 // indirect
24-
github.com/goccy/go-json v0.10.2 // indirect
25-
github.com/golang/snappy v0.0.1 // indirect
26-
github.com/google/uuid v1.3.1 // indirect
24+
github.com/go-playground/validator/v10 v10.26.0 // indirect
25+
github.com/goccy/go-json v0.10.5 // indirect
26+
github.com/golang/snappy v1.0.0 // indirect
27+
github.com/google/uuid v1.6.0 // indirect
2728
github.com/json-iterator/go v1.1.12 // indirect
28-
github.com/klauspost/compress v1.13.6 // indirect
29-
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
30-
github.com/leodido/go-urn v1.2.4 // indirect
31-
github.com/mattn/go-isatty v0.0.19 // indirect
29+
github.com/klauspost/compress v1.18.0 // indirect
30+
github.com/klauspost/cpuid/v2 v2.2.11 // indirect
31+
github.com/leodido/go-urn v1.4.0 // indirect
32+
github.com/mattn/go-isatty v0.0.20 // indirect
3233
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
3334
github.com/modern-go/reflect2 v1.0.2 // indirect
34-
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect
35-
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
35+
github.com/montanaflynn/stats v0.7.1 // indirect
36+
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
37+
github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 // indirect
3638
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
37-
github.com/ugorji/go/codec v1.2.11 // indirect
39+
github.com/ugorji/go/codec v1.3.0 // indirect
3840
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
3941
github.com/xdg-go/scram v1.1.2 // indirect
4042
github.com/xdg-go/stringprep v1.0.4 // indirect
41-
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
42-
golang.org/x/arch v0.3.0 // indirect
43-
golang.org/x/crypto v0.9.0 // indirect
44-
golang.org/x/net v0.10.0 // indirect
45-
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
46-
golang.org/x/sys v0.8.0 // indirect
47-
golang.org/x/text v0.9.0 // indirect
48-
google.golang.org/protobuf v1.30.0 // indirect
43+
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
44+
golang.org/x/arch v0.18.0 // indirect
45+
golang.org/x/crypto v0.39.0 // indirect
46+
golang.org/x/net v0.41.0 // indirect
47+
golang.org/x/sync v0.15.0 // indirect
48+
golang.org/x/sys v0.33.0 // indirect
49+
golang.org/x/text v0.26.0 // indirect
50+
google.golang.org/protobuf v1.36.6 // indirect
4951
gopkg.in/yaml.v3 v3.0.1 // indirect
5052
)

0 commit comments

Comments
 (0)