From bf29b40a8c915187fd11378c56cd93bc2177219b Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 27 Mar 2022 22:15:42 +0200 Subject: [PATCH 1/2] staticcheck: ignore SA1019: strings.Title is deprecated This function is deprecated because it has known limitations when using with multi-byte strings. This limitations are quite "corner case", and our use (mostly) is for ASCII strings. The suggestion replacement brings 20k+ lines of code, which is a bit too much to fix those corner cases. templates/templates.go:23:14: SA1019: strings.Title is deprecated: The rule Title uses for word boundaries does not handle Unicode punctuation properly. Use golang.org/x/text/cases instead. (staticcheck) "title": strings.Title, ^ Signed-off-by: Sebastiaan van Stijn --- templates/templates.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/templates.go b/templates/templates.go index 0e8dd15368..deb043299d 100644 --- a/templates/templates.go +++ b/templates/templates.go @@ -20,7 +20,7 @@ var basicFunctions = template.FuncMap{ }, "split": strings.Split, "join": strings.Join, - "title": strings.Title, + "title": strings.Title, //nolint:staticcheck // strings.Title is deprecated, but we only use it for ASCII, so replacing with golang.org/x/text is out of scope "lower": strings.ToLower, "upper": strings.ToUpper, "pad": padWithSpace, From 635c55d52fb48cc65f13b565006db755fdb170e5 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 27 Mar 2022 19:14:36 +0200 Subject: [PATCH 2/2] update go to 1.18.0 Signed-off-by: Sebastiaan van Stijn --- .github/workflows/test.yml | 2 +- Dockerfile | 2 +- docker-bake.hcl | 2 +- dockerfiles/Dockerfile.dev | 2 +- dockerfiles/Dockerfile.lint | 2 +- dockerfiles/Dockerfile.vendor | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0652127350..a9839143af 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,7 +59,7 @@ jobs: name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.17.8 + go-version: 1.18.0 - name: Test run: | diff --git a/Dockerfile b/Dockerfile index 9842538980..b9bb6f32ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1 ARG BASE_VARIANT=alpine -ARG GO_VERSION=1.17.8 +ARG GO_VERSION=1.18.0 ARG XX_VERSION=1.1.0 ARG GOVERSIONINFO_VERSION=v1.3.0 ARG GOTESTSUM_VERSION=v1.7.0 diff --git a/docker-bake.hcl b/docker-bake.hcl index 60517d11c0..68b191ab88 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,5 +1,5 @@ variable "GO_VERSION" { - default = "1.17.8" + default = "1.18.0" } variable "VERSION" { default = "" diff --git a/dockerfiles/Dockerfile.dev b/dockerfiles/Dockerfile.dev index 7966689b4f..4c5339ea77 100644 --- a/dockerfiles/Dockerfile.dev +++ b/dockerfiles/Dockerfile.dev @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -ARG GO_VERSION=1.17.8 +ARG GO_VERSION=1.18.0 ARG BUILDX_VERSION=0.7.1 FROM docker/buildx-bin:${BUILDX_VERSION} AS buildx diff --git a/dockerfiles/Dockerfile.lint b/dockerfiles/Dockerfile.lint index b28d02634f..cd77f6b1f5 100644 --- a/dockerfiles/Dockerfile.lint +++ b/dockerfiles/Dockerfile.lint @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -ARG GO_VERSION=1.17.8 +ARG GO_VERSION=1.18.0 ARG GOLANGCI_LINT_VERSION=v1.45.2 FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint diff --git a/dockerfiles/Dockerfile.vendor b/dockerfiles/Dockerfile.vendor index 5c31a3f8e9..1f7e014fe9 100644 --- a/dockerfiles/Dockerfile.vendor +++ b/dockerfiles/Dockerfile.vendor @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -ARG GO_VERSION=1.17.8 +ARG GO_VERSION=1.18.0 ARG MODOUTDATED_VERSION=v0.8.0 FROM golang:${GO_VERSION}-alpine AS base