mirror of
https://github.com/minio/minio.git
synced 2025-11-22 18:47:43 -05:00
Remove deprecated io/ioutil (#15707)
This commit is contained in:
@@ -20,7 +20,7 @@ package simdj
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
@@ -40,7 +40,7 @@ func loadCompressed(t tester, file string) (js []byte) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer dec.Close()
|
||||
js, err = ioutil.ReadFile(filepath.Join("testdata", file+".json.zst"))
|
||||
js, err = os.ReadFile(filepath.Join("testdata", file+".json.zst"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -86,7 +86,7 @@ func TestNDJSON(t *testing.T) {
|
||||
if false {
|
||||
t.Log(string(b))
|
||||
}
|
||||
// _ = ioutil.WriteFile(filepath.Join("testdata", tt.name+".json"), b, os.ModePerm)
|
||||
// _ = os.WriteFile(filepath.Join("testdata", tt.name+".json"), b, os.ModePerm)
|
||||
|
||||
parser:
|
||||
for {
|
||||
@@ -121,7 +121,7 @@ func TestNDJSON(t *testing.T) {
|
||||
t.Fatal("unexpected type:", typ.String())
|
||||
}
|
||||
}
|
||||
refDec := json.NewReader(ioutil.NopCloser(bytes.NewBuffer(ref)), &json.ReaderArgs{ContentType: "json"})
|
||||
refDec := json.NewReader(io.NopCloser(bytes.NewBuffer(ref)), &json.ReaderArgs{ContentType: "json"})
|
||||
|
||||
for {
|
||||
rec, err := dec.Read(nil)
|
||||
|
||||
Reference in New Issue
Block a user