From c31a3e4c92bf30ce8d9237e18752a9aaa39d91f4 Mon Sep 17 00:00:00 2001 From: Sylvain Rabot Date: Thu, 31 Mar 2022 00:16:54 +0200 Subject: [PATCH] Build with Go 1.18 (#10501) * Build with Go 1.18 * Update golangci-lint version Signed-off-by: Sylvain Rabot --- .circleci/config.yml | 4 ++-- .github/workflows/golangci-lint.yml | 4 ++-- .promu.yml | 2 +- Makefile.common | 2 +- discovery/xds/kuma_test.go | 2 +- template/template.go | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c6727efeb..9419f8b98 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,10 +11,10 @@ executors: # should also be updated. golang: docker: - - image: quay.io/prometheus/golang-builder:1.17-base + - image: quay.io/prometheus/golang-builder:1.18-base golang_oldest: docker: - - image: quay.io/prometheus/golang-builder:1.16-base + - image: quay.io/prometheus/golang-builder:1.17-base jobs: test_go: diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 8211b9a18..662ea3b6e 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -20,8 +20,8 @@ jobs: - name: install Go uses: actions/setup-go@v2 with: - go-version: 1.17.x + go-version: 1.18.x - name: Lint uses: golangci/golangci-lint-action@v3.1.0 with: - version: v1.44.2 + version: v1.45.2 diff --git a/.promu.yml b/.promu.yml index 9601efeee..6edc2c297 100644 --- a/.promu.yml +++ b/.promu.yml @@ -1,7 +1,7 @@ go: # Whenever the Go version is updated here, # .circle/config.yml should also be updated. - version: 1.17 + version: 1.18 repository: path: github.com/prometheus/prometheus build: diff --git a/Makefile.common b/Makefile.common index 5ab1b142f..c263b733f 100644 --- a/Makefile.common +++ b/Makefile.common @@ -83,7 +83,7 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_ GOLANGCI_LINT := GOLANGCI_LINT_OPTS ?= -GOLANGCI_LINT_VERSION ?= v1.44.2 +GOLANGCI_LINT_VERSION ?= v1.45.2 # golangci-lint only supports linux, darwin and windows platforms on i386/amd64. # windows isn't included here because of the path separator being different. ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin)) diff --git a/discovery/xds/kuma_test.go b/discovery/xds/kuma_test.go index b62e9a0ef..008d63a37 100644 --- a/discovery/xds/kuma_test.go +++ b/discovery/xds/kuma_test.go @@ -31,7 +31,7 @@ import ( ) var ( - kumaConf KumaSDConfig = sdConf + kumaConf = sdConf testKumaMadsV1Resources = []*MonitoringAssignment{ { diff --git a/template/template.go b/template/template.go index ba35658d1..696263998 100644 --- a/template/template.go +++ b/template/template.go @@ -179,7 +179,7 @@ func NewTemplateExpander( return html_template.HTML(text) }, "match": regexp.MatchString, - "title": strings.Title, + "title": strings.Title, // nolint:staticcheck "toUpper": strings.ToUpper, "toLower": strings.ToLower, "graphLink": strutil.GraphLinkForExpression,