mirror of
https://github.com/golang/go.git
synced 2025-11-02 09:40:56 +00:00
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:
parent
d4da735091
commit
7bb721b938
115 changed files with 529 additions and 450 deletions
|
|
@ -7,7 +7,7 @@
|
|||
package tar
|
||||
|
||||
import (
|
||||
"os"
|
||||
"io/fs"
|
||||
"os/user"
|
||||
"runtime"
|
||||
"strconv"
|
||||
|
|
@ -23,7 +23,7 @@ func init() {
|
|||
// The downside is that renaming uname or gname by the OS never takes effect.
|
||||
var userMap, groupMap sync.Map // map[int]string
|
||||
|
||||
func statUnix(fi os.FileInfo, h *Header) error {
|
||||
func statUnix(fi fs.FileInfo, h *Header) error {
|
||||
sys, ok := fi.Sys().(*syscall.Stat_t)
|
||||
if !ok {
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue