Skip to content

Commit

Permalink
Replace ioutil.ReadAll with io.ReadAll
Browse files Browse the repository at this point in the history
  • Loading branch information
lubux committed Oct 1, 2024
1 parent 5f49c73 commit 85bc845
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion openpgp/v2/write_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
5 changes: 4 additions & 1 deletion openpgp/write_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 85bc845

Please sign in to comment.