Replace the deprecated ioutil methods in the test directory

This commit is contained in:
HirazawaUi
2023-04-18 21:51:10 +08:00
parent f33c4a1c79
commit a8b808ee6c
3 changed files with 3 additions and 6 deletions

View File

@@ -22,7 +22,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
credentialproviderv1 "k8s.io/kubelet/pkg/apis/credentialprovider/v1"
@@ -108,7 +107,7 @@ func readURL(url string, client *http.Client) (body []byte, err error) {
}
limitedReader := &io.LimitedReader{R: resp.Body, N: maxReadLength}
contents, err := ioutil.ReadAll(limitedReader)
contents, err := io.ReadAll(limitedReader)
if err != nil {
return nil, err
}