Remove ioutil from client-go

Signed-off-by: inosato <si17_21@yahoo.co.jp>

Kubernetes-commit: 88dfa51b6003c90e8f0a0508939a1d79950a40df
This commit is contained in:
inosato
2022-07-30 20:54:41 +09:00
committed by Kubernetes Publisher
parent 2e404084ad
commit 27de641f75
43 changed files with 248 additions and 275 deletions

View File

@@ -19,7 +19,6 @@ package remotecommand
import (
"fmt"
"io"
"io/ioutil"
"k8s.io/apimachinery/pkg/util/runtime"
)
@@ -39,7 +38,7 @@ func watchErrorStream(errorStream io.Reader, d errorStreamDecoder) chan error {
go func() {
defer runtime.HandleCrash()
message, err := ioutil.ReadAll(errorStream)
message, err := io.ReadAll(errorStream)
switch {
case err != nil && err != io.EOF:
errorChan <- fmt.Errorf("error reading from error stream: %s", err)