зеркало из https://github.com/golang/tools.git
internal/gopathwalk: use os.ReadFile instead of ioutil.ReadFile
ioutil.ReadFile is deprecated. Change-Id: I6854af32d05e4a3ea2ad00002fb39f4d87fc1794 Reviewed-on: https://go-review.googlesource.com/c/tools/+/508504 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
Родитель
aac7fb67ae
Коммит
ec9bc53425
|
@ -10,7 +10,6 @@ import (
|
|||
"bufio"
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
@ -135,7 +134,7 @@ func (w *walker) init() {
|
|||
// The provided path is one of the $GOPATH entries with "src" appended.
|
||||
func (w *walker) getIgnoredDirs(path string) []string {
|
||||
file := filepath.Join(path, ".goimportsignore")
|
||||
slurp, err := ioutil.ReadFile(file)
|
||||
slurp, err := os.ReadFile(file)
|
||||
if w.opts.Logf != nil {
|
||||
if err != nil {
|
||||
w.opts.Logf("%v", err)
|
||||
|
|
Загрузка…
Ссылка в новой задаче