cleanup: remove ioutil for new go version (#9427)

Signed-off-by: xin.li <xin.li@daocloud.io>

Signed-off-by: xin.li <xin.li@daocloud.io>
This commit is contained in:
my-git9 2022-12-21 01:39:46 +08:00 committed by GitHub
parent 87146d6d93
commit 787ea74b6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@ import (
"crypto/tls"
"crypto/x509"
"fmt"
"io/ioutil"
"io"
"net/http"
"net/http/httptest"
"testing"
@ -49,7 +49,7 @@ func TestCertificateCreation(t *testing.T) {
t.Errorf("Response code was %v; want 200", res.StatusCode)
}
body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)
if err != nil {
t.Fatal(err)
}