Skip to content

Commit 8ee84a4

Browse files
authored
Upgrade to go 1.24 (#42)
Signed-off-by: Friedrich Gonzalez <[email protected]>
1 parent 0eefd31 commit 8ee84a4

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.github/workflows/build-test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
- name: Set up Go
1717
uses: actions/setup-go@v3
1818
with:
19-
go-version: 1.22.4
19+
go-version: 1.24.2
2020

2121
- name: Install staticcheck
22-
run: go install honnef.co/go/tools/cmd/staticcheck@2023.1.7
22+
run: go install honnef.co/go/tools/cmd/staticcheck@2025.1.1
2323

2424
- name: Run makefile
2525
run: make all

gateway/load_balancer.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ func (lb *roundRobinLoadBalancer) roundTrip(req *http.Request) (*http.Response,
5555

5656
if len(lb.ips) == 0 {
5757
errMsg := fmt.Sprintln("no IP addresses available")
58-
logrus.Errorf(errMsg)
59-
return nil, fmt.Errorf(errMsg)
58+
logrus.Errorf("%s", errMsg)
59+
return nil, fmt.Errorf("%s", errMsg)
6060
}
6161

6262
ip := lb.getNextIP()

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/cortexproject/auth-gateway
22

3-
go 1.22.4
3+
go 1.24.0
44

55
require (
66
github.com/google/go-github/v53 v53.2.0

server/server.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,11 @@ func checkPortAvailable(addr string, port int, network string) bool {
318318
func checkPort(addr string, port int, defaultPort int, network string) (int, error) {
319319
p := port
320320
if port == 0 {
321-
logrus.Info(fmt.Sprintf("port not specified, trying default port %d", defaultPort))
321+
logrus.Infof("port not specified, trying default port %d", defaultPort)
322322
if checkPortAvailable(addr, defaultPort, network) {
323323
p = defaultPort
324324
} else {
325-
return 0, fmt.Errorf(fmt.Sprintf("port %d is not available, please specify a port", defaultPort))
325+
return 0, fmt.Errorf("port %d is not available, please specify a port", defaultPort)
326326
}
327327
}
328328
return p, nil

0 commit comments

Comments
 (0)