Skip to content

Commit a0d3abb

Browse files
committed
Replace ioutil.ReadAll with io.ReadAll
1 parent 12d80ee commit a0d3abb

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Diff for: openpgp/v2/write_test.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,10 @@ func TestEncryptWithAEAD(t *testing.T) {
10361036
if err != nil {
10371037
t.Fatal(err)
10381038
}
1039-
dec, err := ioutil.ReadAll(m.decrypted)
1039+
dec, err := io.ReadAll(m.decrypted)
1040+
if err != nil {
1041+
t.Fatal(err)
1042+
}
10401043

10411044
if !bytes.Equal(dec, []byte(message)) {
10421045
t.Error("decrypted does not match original")

Diff for: openpgp/write_test.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,10 @@ func TestEncryptWithAEAD(t *testing.T) {
301301
if err != nil {
302302
t.Fatal(err)
303303
}
304-
dec, err := ioutil.ReadAll(m.decrypted)
304+
dec, err := io.ReadAll(m.decrypted)
305+
if err != nil {
306+
t.Fatal(err)
307+
}
305308

306309
if !bytes.Equal(dec, []byte(message)) {
307310
t.Error("decrypted does not match original")

0 commit comments

Comments
 (0)