aboutsummaryrefslogtreecommitdiff
path: root/src/net/mail
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/mail')
-rw-r--r--src/net/mail/example_test.go4
-rw-r--r--src/net/mail/message_test.go5
2 files changed, 4 insertions, 5 deletions
diff --git a/src/net/mail/example_test.go b/src/net/mail/example_test.go
index c3365642aa..d325dc791f 100644
--- a/src/net/mail/example_test.go
+++ b/src/net/mail/example_test.go
@@ -6,7 +6,7 @@ package mail_test
import (
"fmt"
- "io/ioutil"
+ "io"
"log"
"net/mail"
"strings"
@@ -62,7 +62,7 @@ Message body
fmt.Println("To:", header.Get("To"))
fmt.Println("Subject:", header.Get("Subject"))
- body, err := ioutil.ReadAll(m.Body)
+ body, err := io.ReadAll(m.Body)
if err != nil {
log.Fatal(err)
}
diff --git a/src/net/mail/message_test.go b/src/net/mail/message_test.go
index 67e3643aeb..188d0bf766 100644
--- a/src/net/mail/message_test.go
+++ b/src/net/mail/message_test.go
@@ -7,7 +7,6 @@ package mail
import (
"bytes"
"io"
- "io/ioutil"
"mime"
"reflect"
"strings"
@@ -53,7 +52,7 @@ func TestParsing(t *testing.T) {
t.Errorf("test #%d: Incorrectly parsed message header.\nGot:\n%+v\nWant:\n%+v",
i, msg.Header, test.header)
}
- body, err := ioutil.ReadAll(msg.Body)
+ body, err := io.ReadAll(msg.Body)
if err != nil {
t.Errorf("test #%d: Failed reading body: %v", i, err)
continue
@@ -842,7 +841,7 @@ func TestAddressParser(t *testing.T) {
ap := AddressParser{WordDecoder: &mime.WordDecoder{
CharsetReader: func(charset string, input io.Reader) (io.Reader, error) {
- in, err := ioutil.ReadAll(input)
+ in, err := io.ReadAll(input)
if err != nil {
return nil, err
}