зеркало из https://github.com/golang/tools.git
365db56d19
Although ioutil.ReadDir is deprecated, the suggested replacement has a different signature, returning []fs.DirEntry rather than []fs.FileEntry. Some of the places where this occurs are better left referring to ioutil, as build.Config wants the old behavior. (go/buildutil/util.go and godoc/vfs/os.go) When someday build gets updated, these can be easily found, and changed. Some of the place use Mode().IsRegular() (cmd/toolstash/mail.go and internal/fastwalk/fastwal_portable.go) and the code needs a minor adjustment. And, happily, in all the other places one can use os.ReadDir directly as only Name() is called. There are no remaining instances of the generated ioutilReadDir(). Change-Id: I165ca27eafe2fe37fdf14390543b21f7e198281e Reviewed-on: https://go-review.googlesource.com/c/tools/+/528135 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Peter Weinberger <pjw@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com> |
||
---|---|---|
.. | ||
gatefs | ||
httpfs | ||
mapfs | ||
zipfs | ||
emptyvfs.go | ||
fs.go | ||
namespace.go | ||
namespace_test.go | ||
os.go | ||
os_test.go | ||
vfs.go |