Skip to content

Commit

Permalink
refactor: use syscall type
Browse files Browse the repository at this point in the history
  • Loading branch information
kruskall committed Aug 28, 2024
1 parent b4f6f1b commit 86c1607
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions file/fileinfo_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ package file
import (
"errors"
"os"

"golang.org/x/sys/unix"
"syscall"
)

func stat(name string, statFunc func(name string) (os.FileInfo, error)) (FileInfo, error) {
Expand All @@ -36,7 +35,7 @@ func stat(name string, statFunc func(name string) (os.FileInfo, error)) (FileInf
}

func wrap(info os.FileInfo) (FileInfo, error) {
stat, ok := info.Sys().(*unix.Stat_t)
stat, ok := info.Sys().(*syscall.Stat_t)
if !ok {
return nil, errors.New("failed to get uid/gid")
}
Expand Down

0 comments on commit 86c1607

Please sign in to comment.