Cleanup some of the unix code and don't pass ptr to iface to GetOwner

Don't bother using checked type assertion for stat since we are
guarded by specific build configuration, we should know the
correct type, and if not, panicing is fine.

Despite syscall being deprecated a decade ago, we still need it
for FileInfo and sys/windows still calls it as well.
This commit is contained in:
2023-10-06 01:58:28 -05:00
parent 84822200ed
commit fd0f544c04
7 changed files with 36 additions and 54 deletions

View File

@@ -105,7 +105,7 @@ func Readlink(path string) (isRegular bool, s string, err error) {
return false, s, nil
}
func GetOwner(entry *Entry, fileInfo *os.FileInfo) {
func GetOwner(entry *Entry, fileInfo os.FileInfo) {
entry.UID = -1
entry.GID = -1
}