//go:build unix package apply import ( "os" "syscall" ) // statOwner reads a file's numeric owner. Split out because the field is platform-specific and // the rest of this package should not have to know that. func statOwner(info os.FileInfo) (uid, gid int, ok bool) { stat, ok := info.Sys().(*syscall.Stat_t) if !ok { return 0, 0, false } return int(stat.Uid), int(stat.Gid), true }