Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade go version to 1.20. #164

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/go-postsubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

env:
# Common versions
GO_VERSION: '1.19'
GO_VERSION: '1.20'
GO_REQUIRED_MIN_VERSION: ''
defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go-presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

env:
# Common versions
GO_VERSION: '1.19'
GO_VERSION: '1.20'
GO_REQUIRED_MIN_VERSION: ''

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cmd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.19 as builder
FROM golang:1.20 as builder

WORKDIR /workspace

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions pkg/util/portforward.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"math/rand"
"net"
"net/http"
Expand Down Expand Up @@ -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)
Expand Down
Loading