diff --git a/.github/workflows/go-postsubmit.yml b/.github/workflows/go-postsubmit.yml index 5af6c6aa..7708713f 100644 --- a/.github/workflows/go-postsubmit.yml +++ b/.github/workflows/go-postsubmit.yml @@ -9,7 +9,7 @@ on: env: # Common versions - GO_VERSION: '1.19' + GO_VERSION: '1.20' GO_REQUIRED_MIN_VERSION: '' defaults: run: diff --git a/.github/workflows/go-presubmit.yml b/.github/workflows/go-presubmit.yml index cc88d3ca..1bdda750 100644 --- a/.github/workflows/go-presubmit.yml +++ b/.github/workflows/go-presubmit.yml @@ -13,7 +13,7 @@ on: env: # Common versions - GO_VERSION: '1.19' + GO_VERSION: '1.20' GO_REQUIRED_MIN_VERSION: '' jobs: diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml index d6195d06..c8e0763d 100644 --- a/.github/workflows/go-release.yml +++ b/.github/workflows/go-release.yml @@ -6,7 +6,7 @@ on: - 'v*.*.*' env: # Common versions - GO_VERSION: '1.19' + GO_VERSION: '1.20' GO_REQUIRED_MIN_VERSION: '' GITHUB_REF: ${{ github.ref }} CHART_NAME: 'cluster-proxy' diff --git a/Makefile b/Makefile index 72be8be5..fba416cc 100644 --- a/Makefile +++ b/Makefile @@ -57,7 +57,7 @@ vet: ## Run go vet against code. go vet ./... golint: - go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.45.2 + go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.1 golangci-lint run --timeout=3m ./... verify: fmt vet golint diff --git a/cmd/Dockerfile b/cmd/Dockerfile index 7c3f4f76..2f911602 100644 --- a/cmd/Dockerfile +++ b/cmd/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.19 as builder +FROM golang:1.20 as builder WORKDIR /workspace diff --git a/go.mod b/go.mod index bbecb72e..a8d57b0f 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module open-cluster-management.io/cluster-proxy -go 1.19 +go 1.20 require ( github.com/onsi/ginkgo/v2 v2.6.0 diff --git a/pkg/util/portforward.go b/pkg/util/portforward.go index 12ee20a2..b750b871 100644 --- a/pkg/util/portforward.go +++ b/pkg/util/portforward.go @@ -5,7 +5,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "math/rand" "net" "net/http" @@ -183,7 +182,7 @@ func (r *roundRobin) handle(conn net.Conn) error { errorChan := make(chan error) go func() { - message, err := ioutil.ReadAll(errorStream) + message, err := io.ReadAll(errorStream) switch { case err != nil: errorChan <- fmt.Errorf("error reading from error stream for port %d -> %d: %v", r.targetPort, r.targetPort, err)