From 11a1e20d1df6e1a8a9120b917c73551ebc5157bc Mon Sep 17 00:00:00 2001 From: Alper Rifat Ulucinar Date: Thu, 20 Jul 2023 19:03:20 +0300 Subject: [PATCH] Bump Go version to v1.20 in go.mod Signed-off-by: Alper Rifat Ulucinar --- .github/workflows/ci.yml | 9 ++++----- Makefile | 4 ++-- build | 2 +- go.mod | 2 +- pkg/migration/filesystem.go | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e74425c7..22f9ff87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,8 +10,8 @@ on: env: # Common versions - GO_VERSION: '1.19' - GOLANGCI_VERSION: 'v1.50.0' + GO_VERSION: '1.20' + GOLANGCI_VERSION: 'v1.53.3' DOCKER_BUILDX_VERSION: 'v0.8.2' # Common users. We can't run a step 'if secrets.AWS_USR != ""' but we can run @@ -48,7 +48,7 @@ jobs: submodules: true - name: Setup Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} @@ -81,10 +81,9 @@ jobs: # this action because it leaves 'annotations' (i.e. it comments on PRs to # point out linter violations). - name: Lint - uses: golangci/golangci-lint-action@v2 + uses: golangci/golangci-lint-action@639cd343e1d3b897ff35927a75193d57cfcba299 # v3 with: version: ${{ env.GOLANGCI_VERSION }} - skip-go-installation: true check-diff: runs-on: ubuntu-20.04 diff --git a/Makefile b/Makefile index ba6067db..d9bd521f 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,8 @@ PROJECT_NAME := upjet PROJECT_REPO := github.com/upbound/$(PROJECT_NAME) -GOLANGCILINT_VERSION ?= 1.50.0 -GO_REQUIRED_VERSION ?= 1.19 +GOLANGCILINT_VERSION ?= 1.53.3 +GO_REQUIRED_VERSION ?= 1.20 PLATFORMS ?= linux_amd64 linux_arm64 # -include will silently skip missing files, which allows us diff --git a/build b/build index 8c8269df..bd5297bd 160000 --- a/build +++ b/build @@ -1 +1 @@ -Subproject commit 8c8269dfb278dff101fae2dc6f397bd89b5f4f65 +Subproject commit bd5297bd16c113cbc5ed1905b1d96aa1cb3078ec diff --git a/go.mod b/go.mod index fea7a672..5d7334b5 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/upbound/upjet -go 1.19 +go 1.20 require ( github.com/antchfx/htmlquery v1.2.4 diff --git a/pkg/migration/filesystem.go b/pkg/migration/filesystem.go index 02286a18..b79a612b 100644 --- a/pkg/migration/filesystem.go +++ b/pkg/migration/filesystem.go @@ -152,7 +152,7 @@ func (ft *FileSystemTarget) Put(o UnstructuredWithMetadata) error { defer f.Close() //nolint:errcheck - if _, err = f.WriteString(fmt.Sprintf("\n---\n\n%s", string(b))); err != nil { + if _, err = fmt.Fprintf(f, "\n---\n\n%s", string(b)); err != nil { return errors.Wrap(err, "cannot write file") } } else {