// +build !windows

package main

import (
	"os"
	"path/filepath"
	"syscall"
)

func (c *fileCmd) getOwner(f *os.File) (os.FileMode, int, int, error) {
	fInfo, err := f.Stat()
	if err != nil {
		return os.FileMode(0), -1, -1, err
	}

	mode := fInfo.Mode()
	uid := int(fInfo.Sys().(*syscall.Stat_t).Uid)
	gid := int(fInfo.Sys().(*syscall.Stat_t).Gid)

	return mode, uid, gid, nil
}

// +build !windows

package main

import (
	"os"
	"syscall"
)

func (c *fileCmd) getOwner(f *os.File) (os.FileMode, int, int, error) {
	fInfo, err := f.Stat()
	if err != nil {
		return os.FileMode(0), -1, -1, err
	}

	mode := fInfo.Mode()
	uid := int(fInfo.Sys().(*syscall.Stat_t).Uid)
	gid := int(fInfo.Sys().(*syscall.Stat_t).Gid)

	return mode, uid, gid, nil
}

Fix imported and not used
Fix imported and not used

Signed-off-by: anatoly techtonik <657222fa4408d5fb9c49497617f580f8c5974a3b@gmail.com>
