refactor: stop using deprecated io/ioutil

This commit is contained in:
Aayush
2023-03-29 15:40:49 -04:00
parent 36913db0cd
commit 66fc6dc3e5
64 changed files with 161 additions and 215 deletions
+3 -3
View File
@@ -5,7 +5,7 @@ import (
"bytes"
"context"
"embed"
"io/ioutil"
"os"
"path/filepath"
"strings"
"testing"
@@ -77,7 +77,7 @@ func TestImportLocal(t *testing.T) {
})
require.NoError(t, err)
outBytes, err := ioutil.ReadFile(out1)
outBytes, err := os.ReadFile(out1)
require.NoError(t, err)
require.Equal(t, b, outBytes)
@@ -128,7 +128,7 @@ func TestImportLocal(t *testing.T) {
err = files.WriteTo(file, exportedPath)
require.NoError(t, err)
exportedBytes, err := ioutil.ReadFile(exportedPath)
exportedBytes, err := os.ReadFile(exportedPath)
require.NoError(t, err)
// compare original file to recreated unixfs file.