Skip to content

Commit

Permalink
chore: Bump to go 1.22 (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
zmotso authored and SergK committed May 14, 2024
1 parent ef243e6 commit 286d6a8
Show file tree
Hide file tree
Showing 43 changed files with 86 additions and 82 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [ master ]

env:
GOLANG_VERSION: '1.20'
GOLANG_VERSION: '1.22'

jobs:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:
cancel-in-progress: true

env:
GOLANG_VERSION: '1.20'
GOLANG_VERSION: '1.22'

jobs:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- 'v*'

env:
GOLANG_VERSION: '1.20'
GOLANG_VERSION: '1.22'

jobs:
prepare-release:
Expand Down
33 changes: 3 additions & 30 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
run:
timeout: 5m
go: "1.20"
go: "1.22"
issues-exit-code: 1
build-tags:
- mytag
Expand All @@ -10,7 +10,7 @@ run:
allow-parallel-runners: false

output:
format: colored-line-number
formats: colored-line-number
print-issued-lines: true

# print linter name in the end of issue text, default is true
Expand Down Expand Up @@ -280,8 +280,6 @@ linters-settings:
simplify: true

gofumpt:
lang-version: "1.20"

# Choose whether or not to use the extra rules that are disabled
# by default
extra-rules: false
Expand Down Expand Up @@ -325,13 +323,7 @@ linters-settings:
min-confidence: 0.8

gomnd:
settings:
mnd:
# the list of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description.
checks: argument,case,condition,operation,return,assign
# ignored-numbers: 1000
# ignored-files: magic_.*.go
# ignored-functions: math.*
checks: argument,case,condition,operation,return,assign

gomoddirectives:
# Allow local `replace` directives. Default is false.
Expand Down Expand Up @@ -369,9 +361,6 @@ linters-settings:
checks: [ "all" ]

govet:
# report about shadowed variables
check-shadowing: true

# settings per analyzer
settings:
printf: # analyzer name, run `go tool vet help` to see all analyzers
Expand Down Expand Up @@ -424,15 +413,6 @@ linters-settings:
enable-all: false
disable-all: false

depguard:
list-type: blacklist
include-go-root: false
packages:
- github.com/sirupsen/logrus
packages-with-error-message:
# specify an error message to output when a blacklisted package is used
- github.com/sirupsen/logrus: "logging is allowed only by logutils.Log"

ifshort:
# Maximum length of variable declaration measured in number of lines, after which linter won't suggest using short syntax.
# Has higher priority than max-decl-chars.
Expand Down Expand Up @@ -878,15 +858,13 @@ linters:
- containedctx
- cyclop
- decorder
- depguard
- dogsled
- dupl
- durationcheck
- errcheck
- errchkjson
- errname
- errorlint
- execinquery
- exhaustive
- exportloopref
- forbidigo
Expand All @@ -901,18 +879,13 @@ linters:
- ineffassign
- typecheck
- revive
- megacheck
- decorder
- forcetypeassert
- funlen
- gochecknoinits
- wrapcheck
- wsl
- unused

disabled:
- contextcheck #Disabled due to issue https://github.com/golangci/golangci-lint/issues/2649.
- bodyclose #Disabled due to issue https://github.com/timakin/bodyclose/issues/30
fast: false

issues:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ e2e: build
GOLANGCILINT = ${CURRENT_DIR}/bin/golangci-lint
.PHONY: golangci-lint
golangci-lint: ## Download golangci-lint locally if necessary.
$(call go-get-tool,$(GOLANGCILINT),github.com/golangci/golangci-lint/cmd/golangci-lint,v1.52.2)
$(call go-get-tool,$(GOLANGCILINT),github.com/golangci/golangci-lint/cmd/golangci-lint,v1.58.1)

# go-get-tool will 'go get' any package $2 and install it to $1.
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
value: |
GOPROXY=$(params.GOPROXY) make validate-docs
- name: BASE_IMAGE
value: "golang:1.20-bullseye"
value: "golang:1.22-bookworm"
workspaces:
- name: source
workspace: shared-workspace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
description: "Codebasebranchname"
type: string
- name: image
default: 'golang:1.20-bullseye'
default: 'golang:1.22-bookworm'
description: "go image with make installed"
type: string
- name: GOPROXY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
description: "Codebasebranchname"
type: string
- name: image
default: 'golang:1.20-bullseye'
default: 'golang:1.22-bookworm'
description: "go image with make installed"
type: string
- name: GOPROXY
Expand Down Expand Up @@ -98,7 +98,7 @@ spec:
- get-cache
params:
- name: BASE_IMAGE
value: 'epamedp/tekton-python-make:0.1.4'
value: 'epamedp/tekton-python-make:0.1.6'
- name: GOPROXY
value: $(params.GOPROXY)
- name: EXTRA_COMMANDS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
description: "Codebasebranchname"
type: string
- name: image
default: 'golang:1.20-bullseye'
default: 'golang:1.22-bookworm'
description: "go image with make installed"
type: string
- name: GOPROXY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
description: "Codebasebranchname"
type: string
- name: image
default: 'golang:1.20-bullseye'
default: 'golang:1.22-bookworm'
description: "go image with make installed"
type: string
- name: GOPROXY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
description: "Codebasebranchname"
type: string
- name: image
default: 'golang:1.20-bullseye'
default: 'golang:1.22-bookworm'
description: "go image with make installed"
type: string
- name: GOPROXY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
description: git revision to checkout (branch, tag, sha, ref…)
name: git-source-revision
type: string
- default: 'golang:1.20-bullseye'
- default: 'golang:1.22-bookworm'
description: npm image version
name: image
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
description: "Codebasebranchname"
type: string
- name: image
default: 'golang:1.20-bullseye'
default: 'golang:1.22-bookworm'
description: "go image with make installed"
type: string
- name: GOPROXY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
description: "Project name"
type: string
- name: image
default: 'golang:1.20-bullseye'
default: 'golang:1.22-bookworm'
description: "go image with make installed"
type: string
- name: GOPROXY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
description: "Project name"
type: string
- name: image
default: 'golang:1.20-bullseye'
default: 'golang:1.22-bookworm'
description: "go image with make installed"
type: string
- name: GOPROXY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ spec:
value: |
GOPROXY=$(params.GOPROXY) make validate-docs
- name: BASE_IMAGE
value: "golang:1.20-bullseye"
value: "golang:1.22-bookworm"
workspaces:
- name: source
workspace: shared-workspace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
description: "Project name"
type: string
- name: image
default: 'golang:1.20-bullseye'
default: 'golang:1.22-bookworm'
description: "go image with make installed"
type: string
- name: GOPROXY
Expand Down Expand Up @@ -131,7 +131,7 @@ spec:
- build
params:
- name: BASE_IMAGE
value: 'epamedp/tekton-python-make:0.1.4'
value: 'epamedp/tekton-python-make:0.1.6'
- name: GOPROXY
value: $(params.GOPROXY)
- name: EXTRA_COMMANDS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
description: "Project name"
type: string
- name: image
default: 'golang:1.20-bullseye'
default: 'golang:1.22-bookworm'
description: "go image with make installed"
type: string
- name: GOPROXY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
description: "Project name"
type: string
- name: image
default: 'golang:1.20-bullseye'
default: 'golang:1.22-bookworm'
description: "go image with make installed"
type: string
- name: GOPROXY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
description: "Project name"
type: string
- name: image
default: 'golang:1.20-bullseye'
default: 'golang:1.22-bookworm'
description: "go image with make installed"
type: string
- name: GOPROXY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
description: Refspec to fetch before checking out revision.
name: git-refspec
type: string
- default: 'golang:1.20-bullseye'
- default: 'golang:1.22-bookworm'
description: npm image version
name: image
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
description: "Project name"
type: string
- name: image
default: 'golang:1.20-bullseye'
default: 'golang:1.22-bookworm'
description: "go image with make installed"
type: string
- name: GOPROXY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
description: "Project version"
type: string
- name: build-image
default: "golang:1.20-bullseye"
default: "golang:1.22-bookworm"
description: "Image for build agent"
type: string
- name: goproxy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
description: "Project version"
type: string
- name: build-image
default: "golang:1.20-bullseye"
default: "golang:1.22-bookworm"
description: "Image for build agent"
type: string
- name: goproxy
Expand Down
2 changes: 1 addition & 1 deletion charts/custom-pipelines/templates/tasks/CrdocsBuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
type: string
- name: BASE_IMAGE
description: "Base image"
default: "golang:1.20-bullseye"
default: "golang:1.22-bookworm"
type: string
- name: GOPROXY
description: "Go proxy server"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
default: "e2e-vcluster"
- name: GOLANG_IMAGE
type: string
default: "golang:1.20-bullseye"
default: "golang:1.22-bookworm"
- name: TOOLS_IMAGE
type: string
default: "epamedp/tekton-helm:0.1.6"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
default: "e2e-vcluster"
- name: GOLANG_IMAGE
type: string
default: "golang:1.20-bullseye"
default: "golang:1.22-bookworm"
- name: TOOLS_IMAGE
type: string
default: "epamedp/tekton-helm:0.1.6"
Expand Down
2 changes: 1 addition & 1 deletion charts/custom-pipelines/templates/tasks/release/Build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
type: string
- name: base-image
description: "Base image"
default: "golang:1.20-bullseye"
default: "golang:1.22-bookworm"
type: string
- name: goproxy
description: "Go proxy server"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
type: string
- name: base_image
description: "The execute image you want to use."
default: "epamedp/tekton-python-make:0.1.4"
default: "epamedp/tekton-python-make:0.1.6"
type: string
- name: node_image
description: "The execute image you want to use."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
type: string
- name: base_image
description: "The execute image you want to use."
default: "golang:1.20-bullseye"
default: "golang:1.22-bookworm"
type: string
steps:
- name: validate-release-branch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
description: "Codebasebranch name"
type: string
- name: image
default: 'golang:1.20-bullseye'
default: 'golang:1.22-bookworm'
description: "go image version"
type: string
- name: changeNumber
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
description: "Codebasebranch name"
type: string
- name: image
default: 'golang:1.20-bullseye'
default: 'golang:1.22-bookworm'
description: "go image version"
type: string
- name: changeNumber
Expand Down
Loading

0 comments on commit 286d6a8

Please sign in to comment.