From a34e0d738a79f0f5ef73a587aa814632e17b2527 Mon Sep 17 00:00:00 2001 From: Andrew Field Date: Sun, 30 May 2021 00:07:02 +0300 Subject: [PATCH] As of Go 1.16, ioutil.ReadFile just calls os.ReadFile --- examples/reading-files/reading-files.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/reading-files/reading-files.go b/examples/reading-files/reading-files.go index 49387a6..81edc19 100644 --- a/examples/reading-files/reading-files.go +++ b/examples/reading-files/reading-files.go @@ -8,7 +8,6 @@ import ( "bufio" "fmt" "io" - "io/ioutil" "os" ) @@ -24,7 +23,7 @@ func main() { // Perhaps the most basic file reading task is // slurping a file's entire contents into memory. - dat, err := ioutil.ReadFile("/tmp/dat") + dat, err := os.ReadFile("/tmp/dat") check(err) fmt.Print(string(dat))