Skip to content

Commit 44b4f81

Browse files
authored
Merge pull request #256 from SovereignCloudStack/tg/upgrade-of-go-version
2 parents e982769 + e142055 commit 44b4f81

File tree

16 files changed

+58
-62
lines changed

16 files changed

+58
-62
lines changed

.builder-image-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.19
1+
1.1.20

.github/actions/setup-go/action.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ runs:
66
- name: Install go
77
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
88
with:
9+
go-version: "1.22"
910
go-version-file: "go.mod"
1011
cache: true
1112
cache-dependency-path: go.sum

.github/renovate/golang.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
},
55
// https://docs.renovatebot.com/configuration-options/#constraints
66
"constraints": {
7-
"go": "1.21"
7+
"go": "1.22"
88
},
99
packageRules: [
1010
{

.github/workflows/pr-lint.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
2222
runs-on: ubuntu-latest
2323
container:
24-
image: ghcr.io/sovereigncloudstack/cso-builder:1.1.19
24+
image: ghcr.io/sovereigncloudstack/cso-builder:1.1.20
2525
credentials:
2626
username: ${{ github.actor }}
2727
password: ${{ secrets.github_token }}
@@ -31,6 +31,8 @@ jobs:
3131
with:
3232
ref: ${{ github.event.pull_request.head.sha }}
3333

34+
- uses: ./.github/actions/setup-go
35+
3436
- name: Fixup git permissions
3537
# https://github.com/actions/checkout/issues/766
3638
shell: bash

.github/workflows/release.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,8 @@ jobs:
139139
with:
140140
fetch-depth: 0
141141

142-
- name: Install go
143-
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
144-
with:
145-
go-version-file: "go.mod"
146-
cache: true
147-
cache-dependency-path: go.sum
142+
143+
- uses: ./.github/actions/setup-go
148144

149145
- name: install kustomize
150146
run: |

.github/workflows/schedule-scan-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
name: Trivy
1010
runs-on: ubuntu-latest
1111
container:
12-
image: ghcr.io/sovereigncloudstack/cso-builder:1.1.19
12+
image: ghcr.io/sovereigncloudstack/cso-builder:1.1.20
1313
credentials:
1414
username: ${{ github.actor }}
1515
password: ${{ secrets.github_token }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,6 @@ main
8282
*.tgz.yaml
8383
*.build.yaml
8484
.release
85+
86+
# .config/go/telemetry/local/
87+
.config

.golangci.yaml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ linters:
1212
- errname
1313
- errorlint
1414
- exhaustive
15-
- exportloopref
15+
- copyloopvar
1616
- forcetypeassert
1717
- gci
1818
- goconst
@@ -86,10 +86,7 @@ linters-settings:
8686
allow-unused: false
8787
allow-leading-space: false
8888
require-specific: true
89-
staticcheck:
90-
go: "1.21"
9189
stylecheck:
92-
go: "1.21"
9390
checks: ["all", "-ST1006"]
9491
dot-import-whitelist:
9592
- "github.com/onsi/gomega"
@@ -223,8 +220,6 @@ linters-settings:
223220
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#struct-tag
224221
- name: struct-tag
225222
disabled: true
226-
unused:
227-
go: "1.21"
228223
usestdlibvars:
229224
# Suggest the use of http.MethodXX.
230225
# Default: true
@@ -247,9 +242,6 @@ linters-settings:
247242
# Suggest the use of rpc.DefaultXXPath.
248243
# Default: false
249244
default-rpc-path: true
250-
# Suggest the use of os.DevNull.
251-
# Default: false
252-
os-dev-null: true
253245
# Suggest the use of sql.LevelXX.String().
254246
# Default: false
255247
sql-isolation-level: true
@@ -259,9 +251,6 @@ linters-settings:
259251
# Suggest the use of constant.Kind.String().
260252
# Default: false
261253
constant-kind: true
262-
# Suggest the use of syslog.Priority.
263-
# Default: false
264-
syslog-priority: true
265254
wrapcheck:
266255
ignoreSigs:
267256
- status.Error(
@@ -285,11 +274,10 @@ issues:
285274
- linters:
286275
- wrapcheck
287276
path: _test\.go
277+
exclude-dirs:
278+
- vendor$
288279
run:
289280
timeout: 10m
290-
go: "1.21"
281+
go: "1.22"
291282
allow-parallel-runners: true
292283
modules-download-mode: vendor
293-
skip-dirs:
294-
- vendor$
295-
- test/vendor$

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ MGT_CLUSTER_KUBECONFIG ?= ".mgt-cluster-kubeconfig.yaml"
8181

8282
# Kubebuilder.
8383
export KUBEBUILDER_ENVTEST_KUBERNETES_VERSION ?= 1.29.3
84-
# versions
84+
# versions
8585
CTLPTL_VERSION := 0.8.25
8686

8787
##@ Binaries
@@ -445,7 +445,7 @@ ifeq ($(BUILD_IN_CONTAINER),true)
445445
else
446446
go version
447447
golangci-lint version
448-
GO111MODULE=on golangci-lint run -v --out-format=github-actions
448+
GO111MODULE=on golangci-lint run -v --out-format=colored-line-number
449449
endif
450450

451451
.PHONY: lint-yaml

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/SovereignCloudStack/cluster-stack-operator
22

3-
go 1.21
3+
go 1.22
44

55
require (
66
github.com/go-logr/logr v1.4.2

0 commit comments

Comments
 (0)