remove deprecated of package io/ioutil (#3395)

This commit is contained in:
Qt
2022-11-17 22:35:55 +08:00
committed by GitHub
parent 234a1d33f7
commit 6150c488e7
8 changed files with 27 additions and 31 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ package binding
import (
"bytes"
"io/ioutil"
"io"
"mime/multipart"
"net/http"
"testing"
@@ -129,7 +129,7 @@ func assertMultipartFileHeader(t *testing.T, fh *multipart.FileHeader, file test
fl, err := fh.Open()
assert.NoError(t, err)
body, err := ioutil.ReadAll(fl)
body, err := io.ReadAll(fl)
assert.NoError(t, err)
assert.Equal(t, string(file.Content), string(body))