Skip to content

Commit a045d3f

Browse files
committed
BUILD/MEDIUM: go: increase Go version to 1.23
1 parent 12ad85d commit a045d3f

File tree

10 files changed

+12
-11
lines changed

10 files changed

+12
-11
lines changed

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ variables:
1111
KIND: v0.23.0
1212
DOCKER_HOST: tcp://docker:2375
1313
DOCKER_DRIVER: overlay2
14-
GO_VERSION: "1.22"
14+
GO_VERSION: "1.23"
1515
DOCKER_VERSION: "26.0"
1616
diff:
1717
stage: diff
@@ -106,7 +106,7 @@ unit-tests:
106106
- if: $CI_PIPELINE_SOURCE == 'push'
107107
stage: unit-tests
108108
image:
109-
name: $CI_REGISTRY_GO/haproxy-alpine:2.7-go$GO_VERSION
109+
name: $CI_REGISTRY_GO/haproxy-alpine:3.0-go$GO_VERSION
110110
entrypoint: [""]
111111
tags:
112112
- go

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ linters:
4444
- mnd
4545
- inamedparam
4646
- err113 # maybe tmp disable
47+
- exportloopref #deprecated
4748
issues:
4849
exclude:
4950
- "tag is not aligned, should be:" # this is harder to read

Makefile

Lines changed: 1 addition & 1 deletion
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.59.1
5+
GOLANGCI_LINT_VERSION=1.61.0
66

77
.PHONY: test
88
test:

build/Dockerfile

Lines changed: 1 addition & 1 deletion
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.22-alpine AS builder
15+
FROM golang:1.23-alpine AS builder
1616

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

build/Dockerfile.pebble

Lines changed: 1 addition & 1 deletion
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.22-alpine AS builder
15+
FROM golang:1.23-alpine AS builder
1616

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

deploy/tests/images/http-echo/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.22-alpine AS builder
1+
FROM golang:1.23-alpine AS builder
22

33
COPY *.go /src/
44
COPY go.mod /src/go.mod
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module echo-http
22

3-
go 1.22
3+
go 1.23

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/haproxytech/kubernetes-ingress
22

3-
go 1.22.0
3+
go 1.23
44

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

pkg/gateways/gateways.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ func (gm GatewayManagerImpl) isTCPRouteAllowedByListener(listener store.Listener
549549
return routeNamespace != gatewayNamespace
550550
}
551551

552-
gkAllowed := listener.AllowedRoutes.Kinds == nil || len(listener.AllowedRoutes.Kinds) == 0
552+
gkAllowed := len(listener.AllowedRoutes.Kinds) == 0
553553
for _, kind := range listener.AllowedRoutes.Kinds {
554554
if (kind.Group != nil && *kind.Group != v1alpha2.GroupName) || kind.Kind != K8S_TCPROUTE_KIND {
555555
continue

pkg/haproxy/api/runtime.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func (c *clientNative) runRaw(runtime runtime.Runtime, sb strings.Builder, backe
102102
pmm.UpdateRuntimeMetrics(metrics.ObjectServer, err)
103103
return err
104104
}
105-
for i := range len(result) {
105+
for i := range result {
106106
if len(result[i]) > 5 {
107107
switch result[i][1:5] {
108108
case "[3]:", "[2]:", "[1]:", "[0]:":
@@ -138,7 +138,7 @@ func (c *clientNative) SetMapContent(mapFile string, payload []string) error {
138138
err = fmt.Errorf("error getting map path: %w", err)
139139
return err
140140
}
141-
for i := range len(payload) {
141+
for i := range payload {
142142
_, err = runtime.ExecuteRaw(fmt.Sprintf("add map @%s %s <<\n%s\n", mapVer, mapPath, payload[i]))
143143
pmm.UpdateRuntimeMetrics(metrics.ObjectMap, err)
144144
if err != nil {

0 commit comments

Comments
 (0)