Skip to content

Commit c78f289

Browse files
committed
BUILD/MINOR: upgrade go version
1 parent 481b5c9 commit c78f289

File tree

16 files changed

+18
-19
lines changed

16 files changed

+18
-19
lines changed

.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ variables:
1111
KIND: v0.26.0
1212
DOCKER_HOST: tcp://docker:2375
1313
DOCKER_DRIVER: overlay2
14-
GO_VERSION: "1.23"
14+
GO_VERSION: "1.24"
1515
DOCKER_VERSION: "26.0"
1616
diff:
1717
stage: diff

.golangci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ linters:
2626
- goconst
2727
- gocyclo
2828
- godot
29-
- gomnd
3029
- lll
3130
- nestif
3231
- nlreturn
@@ -39,12 +38,13 @@ linters:
3938
- exhaustruct
4039
- nonamedreturns
4140
- forcetypeassert
42-
- execinquery #deprecated
4341
- depguard
4442
- mnd
4543
- inamedparam
44+
- asasalint
4645
- err113 # maybe tmp disable
47-
- exportloopref #deprecated
46+
- recvcheck # maybe tmp disable
47+
- tenv # deprecated
4848
issues:
4949
exclude:
5050
- "tag is not aligned, should be:" # this is harder to read

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PROJECT_PATH=${PWD}
22
TARGETPLATFORM?=linux/amd64
33
GOOS?=linux
44
GOARCH?=amd64
5-
GOLANGCI_LINT_VERSION=1.61.0
5+
GOLANGCI_LINT_VERSION=1.64.5
66
CHECK_COMMIT=5.0.4
77

88
.PHONY: test

build/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM golang:1.23-alpine AS builder
15+
FROM golang:1.24-alpine AS builder
1616

1717
RUN apk --no-cache add git openssh
1818

build/Dockerfile.pebble

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM golang:1.23-alpine AS builder
15+
FROM golang:1.24-alpine AS builder
1616

1717
RUN apk --no-cache add git openssh
1818

deploy/tests/e2e/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ func GetCertSubject(filename string) (certInfo CertInfo, err error) {
259259
case strings.HasPrefix(line, "Used:"):
260260
used, convErr := strconv.ParseBool(strings.Split(line, ": ")[1])
261261
if convErr != nil {
262-
return
262+
return //nolint:nilnesserr
263263
}
264264
certInfo.Used = used
265265
case strings.HasPrefix(line, "Subject:"):

deploy/tests/images/http-echo/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.23-alpine AS builder
1+
FROM golang:1.24-alpine AS builder
22

33
COPY *.go /src/
44
COPY go.mod /src/go.mod

deploy/tests/images/http-echo/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module echo-http
22

3-
go 1.23
3+
go 1.24

deploy/tests/integration/base-suite.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
package integration
1616

1717
import (
18-
"fmt"
1918
"os"
2019
"path/filepath"
2120
"strings"
@@ -171,5 +170,5 @@ func (suite *BaseSuite) ExpectHaproxyConfigContains(s string, count int) {
171170
suite.T().Error(err.Error())
172171
}
173172
c := strings.Count(string(content), s)
174-
suite.Exactly(count, c, fmt.Sprintf("%s is repeated %d times but expected %d", s, c, count))
173+
suite.Exactly(count, c, "%s is repeated %d times but expected %d", s, c, count)
175174
}

documentation/gen/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module doc-gen
22

3-
go 1.23
3+
go 1.24
44

55
require (
66
github.com/google/renameio v1.0.1

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/haproxytech/kubernetes-ingress
22

3-
go 1.23.0
3+
go 1.24.0
44

55
require (
66
github.com/Masterminds/semver/v3 v3.3.1

pkg/haproxy/api/backend_switching_rule.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func (c *clientNative) BackendSwitchingRuleDeleteAll(frontend string) (err error
2121
if err != nil {
2222
return
2323
}
24-
for range len(switchingRules) {
24+
for range switchingRules {
2525
if err = configuration.DeleteBackendSwitchingRule(0, frontend, c.activeTransaction, 0); err != nil {
2626
break
2727
}

pkg/haproxy/api/capture.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func (c *clientNative) CaptureDeleteAll(frontend string) (err error) {
2121
if err != nil {
2222
return
2323
}
24-
for range len(rules) {
24+
for range rules {
2525
if err = configuration.DeleteDeclareCapture(0, frontend, c.activeTransaction, 0); err != nil {
2626
break
2727
}

pkg/haproxy/api/filters.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func (c *clientNative) FilterDeleteAll(parentType, parentName string) (err error
2121
if err != nil {
2222
return
2323
}
24-
for range len(rules) {
24+
for range rules {
2525
if err = configuration.DeleteFilter(0, parentType, parentName, c.activeTransaction, 0); err != nil {
2626
break
2727
}

pkg/haproxy/api/log_target.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func (c *clientNative) LogTargetDeleteAll(parentType, parentName string) (err er
2121
if err != nil {
2222
return
2323
}
24-
for range len(rules) {
24+
for range rules {
2525
if err = configuration.DeleteLogTarget(0, parentType, parentName, c.activeTransaction, 0); err != nil {
2626
break
2727
}

pkg/haproxy/api/tcp_request_rule.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func (c *clientNative) TCPRequestRuleDeleteAll(parentType, parentName string) (e
2121
if err != nil {
2222
return
2323
}
24-
for range len(rules) {
24+
for range rules {
2525
if err = configuration.DeleteTCPRequestRule(0, parentType, parentName, c.activeTransaction, 0); err != nil {
2626
break
2727
}

0 commit comments

Comments
 (0)