Skip to content

Commit

Permalink
BUILD/MINOR: upgrade go version
Browse files Browse the repository at this point in the history
  • Loading branch information
oktalz committed Feb 24, 2025
1 parent 481b5c9 commit c78f289
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ variables:
KIND: v0.26.0
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
GO_VERSION: "1.23"
GO_VERSION: "1.24"
DOCKER_VERSION: "26.0"
diff:
stage: diff
Expand Down
6 changes: 3 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ linters:
- goconst
- gocyclo
- godot
- gomnd
- lll
- nestif
- nlreturn
Expand All @@ -39,12 +38,13 @@ linters:
- exhaustruct
- nonamedreturns
- forcetypeassert
- execinquery #deprecated
- depguard
- mnd
- inamedparam
- asasalint
- err113 # maybe tmp disable
- exportloopref #deprecated
- recvcheck # maybe tmp disable
- tenv # deprecated
issues:
exclude:
- "tag is not aligned, should be:" # this is harder to read
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PROJECT_PATH=${PWD}
TARGETPLATFORM?=linux/amd64
GOOS?=linux
GOARCH?=amd64
GOLANGCI_LINT_VERSION=1.61.0
GOLANGCI_LINT_VERSION=1.64.5
CHECK_COMMIT=5.0.4

.PHONY: test
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.23-alpine AS builder
FROM golang:1.24-alpine AS builder

RUN apk --no-cache add git openssh

Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile.pebble
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.23-alpine AS builder
FROM golang:1.24-alpine AS builder

RUN apk --no-cache add git openssh

Expand Down
2 changes: 1 addition & 1 deletion deploy/tests/e2e/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func GetCertSubject(filename string) (certInfo CertInfo, err error) {
case strings.HasPrefix(line, "Used:"):
used, convErr := strconv.ParseBool(strings.Split(line, ": ")[1])
if convErr != nil {
return
return //nolint:nilnesserr
}
certInfo.Used = used
case strings.HasPrefix(line, "Subject:"):
Expand Down
2 changes: 1 addition & 1 deletion deploy/tests/images/http-echo/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.23-alpine AS builder
FROM golang:1.24-alpine AS builder

COPY *.go /src/
COPY go.mod /src/go.mod
Expand Down
2 changes: 1 addition & 1 deletion deploy/tests/images/http-echo/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module echo-http

go 1.23
go 1.24
3 changes: 1 addition & 2 deletions deploy/tests/integration/base-suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package integration

import (
"fmt"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -171,5 +170,5 @@ func (suite *BaseSuite) ExpectHaproxyConfigContains(s string, count int) {
suite.T().Error(err.Error())
}
c := strings.Count(string(content), s)
suite.Exactly(count, c, fmt.Sprintf("%s is repeated %d times but expected %d", s, c, count))
suite.Exactly(count, c, "%s is repeated %d times but expected %d", s, c, count)
}
2 changes: 1 addition & 1 deletion documentation/gen/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module doc-gen

go 1.23
go 1.24

require (
github.com/google/renameio v1.0.1
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/haproxytech/kubernetes-ingress

go 1.23.0
go 1.24.0

require (
github.com/Masterminds/semver/v3 v3.3.1
Expand Down
2 changes: 1 addition & 1 deletion pkg/haproxy/api/backend_switching_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (c *clientNative) BackendSwitchingRuleDeleteAll(frontend string) (err error
if err != nil {
return
}
for range len(switchingRules) {
for range switchingRules {
if err = configuration.DeleteBackendSwitchingRule(0, frontend, c.activeTransaction, 0); err != nil {
break
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/haproxy/api/capture.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (c *clientNative) CaptureDeleteAll(frontend string) (err error) {
if err != nil {
return
}
for range len(rules) {
for range rules {
if err = configuration.DeleteDeclareCapture(0, frontend, c.activeTransaction, 0); err != nil {
break
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/haproxy/api/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (c *clientNative) FilterDeleteAll(parentType, parentName string) (err error
if err != nil {
return
}
for range len(rules) {
for range rules {
if err = configuration.DeleteFilter(0, parentType, parentName, c.activeTransaction, 0); err != nil {
break
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/haproxy/api/log_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (c *clientNative) LogTargetDeleteAll(parentType, parentName string) (err er
if err != nil {
return
}
for range len(rules) {
for range rules {
if err = configuration.DeleteLogTarget(0, parentType, parentName, c.activeTransaction, 0); err != nil {
break
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/haproxy/api/tcp_request_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (c *clientNative) TCPRequestRuleDeleteAll(parentType, parentName string) (e
if err != nil {
return
}
for range len(rules) {
for range rules {
if err = configuration.DeleteTCPRequestRule(0, parentType, parentName, c.activeTransaction, 0); err != nil {
break
}
Expand Down

0 comments on commit c78f289

Please sign in to comment.