mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-10 21:54:01 +00:00
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 <skitt@redhat.com> Kubernetes-commit: b60a3a58df2791ae67764f6325be31aea5eca5a0
This commit is contained in:
parent
41d4a164f9
commit
caded3c2dc
@ -23,7 +23,6 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"net/url"
|
"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 {
|
if err != nil {
|
||||||
t.Errorf("error reading the stream: %v", err)
|
t.Errorf("error reading the stream: %v", err)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user