You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: hardlink_unix.go
    path of file: ./repos/podman/vendor/github.com/containers/buildah/copier
    
    the code of the file until where you have to start completion: //go:build linux || darwin || freebsd
// +build linux darwin freebsd

package copier

import (
	"os"
	"sync"
	"syscall"
)

type hardlinkDeviceAndInode struct {
	device, inode uint64
}

type hardlinkChecker struct {
	hardlinks sync.Map
}

fu
    
func (h *hardlinkChecker) Check(fi os.FileInfo) string {
	if st, ok := fi.Sys().(*syscall.Stat_t); ok && fi.Mode().IsRegular() && st.Nlink > 1 {
		if name, ok := h.hardlinks.Load(makeHardlinkDeviceAndInode(st)); ok && name.(string) != "" {
			return name.(string)
		}
	}
	return ""
}