Skip to content

Commit 85bc845

Browse files
committed
Replace ioutil.ReadAll with io.ReadAll
1 parent 5f49c73 commit 85bc845

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
@@ -1041,7 +1041,10 @@ func TestEncryptWithAEAD(t *testing.T) {
10411041
if err != nil {
10421042
t.Fatal(err)
10431043
}
1044-
dec, err := ioutil.ReadAll(m.decrypted)
1044+
dec, err := io.ReadAll(m.decrypted)
1045+
if err != nil {
1046+
t.Fatal(err)
1047+
}
10451048

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

Diff for: openpgp/write_test.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,10 @@ func TestEncryptWithAEAD(t *testing.T) {
305305
if err != nil {
306306
t.Fatal(err)
307307
}
308-
dec, err := ioutil.ReadAll(m.decrypted)
308+
dec, err := io.ReadAll(m.decrypted)
309+
if err != nil {
310+
t.Fatal(err)
311+
}
309312

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

0 commit comments

Comments
 (0)