From 1b09d430678d4a6f73b2443463d11f75851aba8a Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 16 Oct 2020 00:49:02 -0400 Subject: all: update references to symbols moved from io/ioutil to io The old ioutil references are still valid, but update our code to reflect best practices and get used to the new locations. Code compiled with the bootstrap toolchain (cmd/asm, cmd/dist, cmd/compile, debug/elf) must remain Go 1.4-compatible and is excluded. Also excluded vendored code. For #41190. Change-Id: I6d86f2bf7bc37a9d904b6cee3fe0c7af6d94d5b1 Reviewed-on: https://go-review.googlesource.com/c/go/+/263142 Trust: Russ Cox Run-TryBot: Russ Cox TryBot-Result: Go Bot Reviewed-by: Emmanuel Odeke --- src/net/mail/example_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/net/mail/example_test.go') 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) } -- cgit v1.2.1