From caded3c2dcf179843fbe7d2ffc3f6990077b5b09 Mon Sep 17 00:00:00 2001 From: Stephen Kitt Date: Tue, 2 May 2023 15:08:18 +0200 Subject: [PATCH] api-machinery: stop using deprecated io/ioutil This replaces deprecated ioutil functions as follows: * ioutil.ReadAll -> io.ReadAll * ioutil.ReadFile -> os.ReadFile * ioutil.TempDir -> os.MkdirTemp * ioutil.TempFile -> os.CreateTemp * ioutil.WriteFile -> os.WriteFile Signed-off-by: Stephen Kitt Kubernetes-commit: b60a3a58df2791ae67764f6325be31aea5eca5a0 --- tools/remotecommand/remotecommand_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/remotecommand/remotecommand_test.go b/tools/remotecommand/remotecommand_test.go index 7e01d76e..c59b8270 100644 --- a/tools/remotecommand/remotecommand_test.go +++ b/tools/remotecommand/remotecommand_test.go @@ -23,7 +23,6 @@ import ( "encoding/json" "errors" "io" - "io/ioutil" "net/http" "net/http/httptest" "net/url" @@ -416,7 +415,7 @@ func TestStreamRandomData(t *testing.T) { } } - data, err := ioutil.ReadAll(bytes.NewReader(stdout.Bytes())) + data, err := io.ReadAll(bytes.NewReader(stdout.Bytes())) if err != nil { t.Errorf("error reading the stream: %v", err) return