mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +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>
17 lines
289 B
Go
17 lines
289 B
Go
//go:build linux
|
|
// +build linux
|
|
|
|
package ctime
|
|
|
|
import (
|
|
"os"
|
|
"syscall"
|
|
"time"
|
|
)
|
|
|
|
func created(fi os.FileInfo) time.Time {
|
|
st := fi.Sys().(*syscall.Stat_t)
|
|
//nolint:unconvert // need to type cast on some cpu architectures
|
|
return time.Unix(int64(st.Ctim.Sec), int64(st.Ctim.Nsec))
|
|
}
|