From 4a14603c56f1d798085829bb5eee7e6d1e8279fa Mon Sep 17 00:00:00 2001 From: pigletfly Date: Wed, 12 Apr 2023 11:31:59 +0800 Subject: [PATCH] bump golang version to 1.19 Signed-off-by: pigletfly --- .github/workflows/ci.yml | 2 +- go.mod | 2 +- node/api/metrics_test.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac053f693..921db7739 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ on: pull_request: env: - GO_VERSION: "1.18" + GO_VERSION: "1.19" jobs: lint: diff --git a/go.mod b/go.mod index 700abab79..dc37f5b06 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/virtual-kubelet/virtual-kubelet -go 1.17 +go 1.19 require ( contrib.go.opencensus.io/exporter/jaeger v0.2.1 diff --git a/node/api/metrics_test.go b/node/api/metrics_test.go index 1e60fbf44..81873ae9f 100644 --- a/node/api/metrics_test.go +++ b/node/api/metrics_test.go @@ -16,7 +16,7 @@ package api_test import ( "context" - "io/ioutil" + "io" "net/http" "net/http/httptest" "testing" @@ -125,7 +125,7 @@ func TestHandlePodMetricsResource(t *testing.T) { assert.Equal(t, tc.expectedStatusCode, rr.Code) if tc.expectedError != nil { - bodyBytes, err := ioutil.ReadAll(rr.Body) + bodyBytes, err := io.ReadAll(rr.Body) require.NoError(t, err) assert.Contains(t, string(bodyBytes), tc.expectedError.Error()) } else if tc.expectedStatusCode == http.StatusOK {