all: update references to symbols moved from os to io/fs

The old os 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.

For #41190.

Change-Id: I8f9526977867c10a221e2f392f78d7dec073f1bd
Reviewed-on: https://go-review.googlesource.com/c/go/+/243907
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
Russ Cox 2020-07-07 13:49:21 -04:00
parent d4da735091
commit 7bb721b938
115 changed files with 529 additions and 450 deletions

View file

@ -7,9 +7,9 @@ package suffixarray
import (
"bytes"
"fmt"
"io/fs"
"io/ioutil"
"math/rand"
"os"
"path/filepath"
"regexp"
"sort"
@ -503,7 +503,7 @@ func makeText(name string) ([]byte, error) {
return nil, err
}
case "go":
err := filepath.Walk("../..", func(path string, info os.FileInfo, err error) error {
err := filepath.Walk("../..", func(path string, info fs.FileInfo, err error) error {
if err == nil && strings.HasSuffix(path, ".go") && !info.IsDir() {
file, err := ioutil.ReadFile(path)
if err != nil {