mirror of
https://github.com/containers/podman.git
synced 2025-10-30 01:17:00 +08:00
The nolintlint linter does not deny the use of `//nolint` Instead it allows us to enforce a common nolint style: - force that a linter name must be specified - do not add a space between `//` and `nolint` - make sure nolint is only used when there is actually a problem Signed-off-by: Paul Holzinger <pholzing@redhat.com>
18 lines
264 B
Go
18 lines
264 B
Go
//go:build !windows
|
|
// +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
|
|
Ino: st.Ino,
|
|
}, st.Nlink > 1
|
|
}
|