mirror of
https://github.com/containers/podman.git
synced 2025-11-29 09:37:38 +08:00
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>
17 lines
255 B
Go
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
|
|
}
|