From 5c6f2b4a007b3dfcdfb4d6b01524ae6f4fd9f997 Mon Sep 17 00:00:00 2001 From: Lukas Burkhalter Date: Thu, 18 Jan 2024 15:33:40 +0100 Subject: [PATCH] Replace ioutil.ReadAll with io.ReadAll --- openpgp/v2/write_test.go | 5 ++++- openpgp/write_test.go | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/openpgp/v2/write_test.go b/openpgp/v2/write_test.go index d3c7ff48f..285508626 100644 --- a/openpgp/v2/write_test.go +++ b/openpgp/v2/write_test.go @@ -1041,7 +1041,10 @@ func TestEncryptWithAEAD(t *testing.T) { if err != nil { t.Fatal(err) } - dec, err := ioutil.ReadAll(m.decrypted) + dec, err := io.ReadAll(m.decrypted) + if err != nil { + t.Fatal(err) + } if !bytes.Equal(dec, []byte(message)) { t.Error("decrypted does not match original") diff --git a/openpgp/write_test.go b/openpgp/write_test.go index e2b8acb0b..315e73233 100644 --- a/openpgp/write_test.go +++ b/openpgp/write_test.go @@ -305,7 +305,10 @@ func TestEncryptWithAEAD(t *testing.T) { if err != nil { t.Fatal(err) } - dec, err := ioutil.ReadAll(m.decrypted) + dec, err := io.ReadAll(m.decrypted) + if err != nil { + t.Fatal(err) + } if !bytes.Equal(dec, []byte(message)) { t.Error("decrypted does not match original")