all: replace package ioutil with os and io in src

For #45557

Change-Id: I56824135d86452603dd4ed4bab0e24c201bb0683
Reviewed-on: https://go-review.googlesource.com/c/go/+/426257
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Andy Pan <panjf2000@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
Andy Pan 2022-08-28 03:38:00 +08:00 committed by Gopher Robot
parent 1e7e160d07
commit f8c659b62f
67 changed files with 255 additions and 290 deletions

View file

@ -32,7 +32,6 @@ import (
"flag"
"fmt"
"internal/testenv"
"io/ioutil"
"os"
"path/filepath"
"regexp"
@ -178,7 +177,7 @@ func testSyntaxErrors(t *testing.T, filename string) {
func TestSyntaxErrors(t *testing.T) {
testenv.MustHaveGoBuild(t) // we need access to source (testdata)
list, err := ioutil.ReadDir(testdata)
list, err := os.ReadDir(testdata)
if err != nil {
t.Fatal(err)
}