Skip to content

Commit 7af4c11

Browse files
authored
Merge pull request #3478 from jackfrancis/go1.20
update golang to v1.20
2 parents 7acc183 + 2908f13 commit 7af4c11

File tree

13 files changed

+18
-17
lines changed

13 files changed

+18
-17
lines changed

.github/workflows/cover.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v3
1414
- uses: actions/setup-go@v4
1515
with:
16-
go-version: '1.19'
16+
go-version: '1.20'
1717
- run: "PATH=/usr/local/go/bin:$PATH make test-cover"
1818
- uses: codecov/codecov-action@v3
1919
with:

.github/workflows/dependabot-code-gen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Set up Go 1.x
2121
uses: actions/setup-go@v4
2222
with:
23-
go-version: '1.19'
23+
go-version: '1.20'
2424
id: go
2525
- name: Check out code into the Go module directory
2626
uses: actions/checkout@v3 # tag=v3.2.0

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Install go
2121
uses: actions/setup-go@v4
2222
with:
23-
go-version: '^1.19'
23+
go-version: '^1.20'
2424
- name: generate release artifacts
2525
run: |
2626
make release

.github/workflows/scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ jobs:
1717
- name: Setup go
1818
uses: actions/setup-go@d0a58c1c4d2b25278816e339b944508c875f3613 # tag=v3.4.0
1919
with:
20-
go-version: 1.19
20+
go-version: 1.20
2121
- name: Run verify container script
2222
run: make verify-container-images

.golangci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ linters-settings:
135135
arguments:
136136
- disableStutteringCheck
137137
staticcheck:
138-
go: "1.19"
138+
go: "1.20"
139139
stylecheck:
140-
go: "1.19"
140+
go: "1.20"
141141
unused:
142-
go: "1.19"
142+
go: "1.20"
143143

144144
issues:
145145
exclude-rules:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
ARG ARCH
1919

2020
# Build the manager binary
21-
FROM golang:1.19 as builder
21+
FROM golang:1.20 as builder
2222
WORKDIR /workspace
2323

2424
# Run this with docker build --build_arg $(go env GOPROXY) to override the goproxy

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ delete-workload-cluster: $(KUBECTL) ## Deletes the example workload Kubernetes c
368368
.PHONY: docker-pull-prerequisites
369369
docker-pull-prerequisites: ## Pull prerequisites for building controller-manager.
370370
docker pull docker/dockerfile:1.4
371-
docker pull docker.io/library/golang:1.19
371+
docker pull docker.io/library/golang:1.20
372372
docker pull gcr.io/distroless/static:latest
373373

374374
.PHONY: docker-build
@@ -614,7 +614,7 @@ release-binary: $(RELEASE_DIR) ## Compile and build release binaries.
614614
-e GOARCH=$(GOARCH) \
615615
-v "$$(pwd):/workspace" \
616616
-w /workspace \
617-
golang:1.19 \
617+
golang:1.20 \
618618
go build -a -ldflags '$(LDFLAGS) -extldflags "-static"' \
619619
-o $(RELEASE_DIR)/$(notdir $(RELEASE_BINARY))-$(GOOS)-$(GOARCH) $(RELEASE_BINARY)
620620

Tiltfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def validate_auth():
108108

109109
tilt_helper_dockerfile_header = """
110110
# Tilt image
111-
FROM golang:1.19 as tilt-helper
111+
FROM golang:1.20 as tilt-helper
112112
# Support live reloading with Tilt
113113
RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com/windmilleng/rerun-process-wrapper/master/restart.sh && \
114114
wget --output-document /start.sh --quiet https://raw.githubusercontent.com/windmilleng/rerun-process-wrapper/master/start.sh && \

azure/scope/strategies/machinepool_deployments/machinepool_deployment_strategy.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,9 @@ func orderByOldest(machines []infrav1exp.AzureMachinePoolMachine) []infrav1exp.A
290290
}
291291

292292
func orderRandom(machines []infrav1exp.AzureMachinePoolMachine) []infrav1exp.AzureMachinePoolMachine {
293-
rand.Seed(time.Now().UnixNano())
294-
rand.Shuffle(len(machines), func(i, j int) { machines[i], machines[j] = machines[j], machines[i] })
293+
//nolint:gosec // We don't need a cryptographically appropriate random number here
294+
r := rand.New(rand.NewSource(time.Now().UnixNano()))
295+
r.Shuffle(len(machines), func(i, j int) { machines[i], machines[j] = machines[j], machines[i] })
295296
return machines
296297
}
297298

docs/book/src/developers/development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
### Base requirements
4747

4848
1. Install [go][go]
49-
- Get the latest patch version for go v1.19.
49+
- Get the latest patch version for go v1.20.
5050
2. Install [jq][jq]
5151
- `brew install jq` on macOS.
5252
- `sudo apt install jq` on Windows + WSL2

0 commit comments

Comments
 (0)