Files
podman/pkg/bindings/images/build_unix.go
Kir Kolyshkin 486327e2b9 pkg/bindings/images: fix linter warning on Darwin
With GOOS=darwin, golangci-lint complains:

> pkg/bindings/images/build_unix.go:13:24: directive `//nolint:unconvert` is unused for linter "unconvert" (nolintlint)
> 		Dev: uint64(st.Dev), //nolint:unconvert
> 		                     ^

Indeed, Stat_t.Dev is always uint64 on darwin

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:27:55 -07:00

17 lines
255 B
Go

//go:build !windows
package images
import (
"os"
"syscall"
)
func checkHardLink(fi os.FileInfo) (devino, bool) {
st := fi.Sys().(*syscall.Stat_t)
return devino{
Dev: uint64(st.Dev), //nolint:unconvert,nolintlint
Ino: st.Ino,
}, st.Nlink > 1
}