diff options
| author | Taras Madan <tarasmadan@google.com> | 2023-02-23 14:28:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-23 14:28:18 +0100 |
| commit | 4359978ef22a22ddd5a19adf18cbc80cb44244fb (patch) | |
| tree | 7952da94e27417b39ddf952d9e0bab431dafc4c5 /pkg/image | |
| parent | 9e2ebb3c174f1e168bc1fbadd5f02f2e25e314fc (diff) | |
all: ioutil is deprecated in go1.19 (#3718)
Diffstat (limited to 'pkg/image')
| -rw-r--r-- | pkg/image/compression.go | 3 | ||||
| -rw-r--r-- | pkg/image/compression_test.go | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/pkg/image/compression.go b/pkg/image/compression.go index c374ed07b..70e314ae5 100644 --- a/pkg/image/compression.go +++ b/pkg/image/compression.go @@ -9,7 +9,6 @@ import ( "encoding/base64" "fmt" "io" - "io/ioutil" ) func Compress(rawData []byte) []byte { @@ -37,7 +36,7 @@ func MustDecompress(compressed []byte) (data []byte, dtor func()) { } func DecompressCheck(compressed []byte) error { - return decompressWriter(ioutil.Discard, compressed) + return decompressWriter(io.Discard, compressed) } func decompressWriter(w io.Writer, compressed []byte) error { diff --git a/pkg/image/compression_test.go b/pkg/image/compression_test.go index 15a225052..08caa40d6 100644 --- a/pkg/image/compression_test.go +++ b/pkg/image/compression_test.go @@ -6,8 +6,8 @@ package image_test import ( "bytes" "fmt" - "io/ioutil" "math/rand" + "os" "path/filepath" "testing" @@ -51,7 +51,7 @@ func TestEncode(t *testing.T) { func BenchmarkDecompress(b *testing.B) { // Extract the largest image seed. - data, err := ioutil.ReadFile(filepath.FromSlash("../../sys/linux/test/syz_mount_image_gfs2_0")) + data, err := os.ReadFile(filepath.FromSlash("../../sys/linux/test/syz_mount_image_gfs2_0")) if err != nil { b.Fatal(err) } |
