internal/communicator: deprecate io/ioutil (#332)

Signed-off-by: Lars Lehtonen <lars.lehtonen@gmail.com>
This commit is contained in:
Lars Lehtonen
2023-09-07 07:50:30 -07:00
committed by GitHub
parent 3d7fda123a
commit 9d595db5af
4 changed files with 8 additions and 12 deletions

View File

@@ -12,7 +12,6 @@ import (
"encoding/base64"
"fmt"
"io"
"io/ioutil"
"math/rand"
"net"
"os"
@@ -607,7 +606,7 @@ func TestAccUploadFile(t *testing.T) {
t.Fatalf("error uploading file: %s", err)
}
data, err := ioutil.ReadFile(tmpFile)
data, err := os.ReadFile(tmpFile)
if err != nil {
t.Fatal(err)
}
@@ -641,7 +640,7 @@ func TestAccHugeUploadFile(t *testing.T) {
size := int64(1 << 32)
source := io.LimitReader(rand.New(rand.NewSource(0)), size)
dest, err := ioutil.TempFile("", "communicator")
dest, err := os.CreateTemp("", "communicator")
if err != nil {
t.Fatal(err)
}