fix: Windows build + gosec lint errors (#585)
Fixes Windows build by adding platform-specific inode handling via build tags. Also fixes gosec lint warnings in migrate_tombstones.go. Thanks @deblasis!
This commit is contained in:
committed by
GitHub
parent
aed166fe85
commit
1ba12e1620
19
internal/storage/sqlite/freshness_unix.go
Normal file
19
internal/storage/sqlite/freshness_unix.go
Normal file
@@ -0,0 +1,19 @@
|
||||
//go:build !windows
|
||||
|
||||
// Package sqlite implements the storage interface using SQLite.
|
||||
package sqlite
|
||||
|
||||
import (
|
||||
"os"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
// getFileInode extracts the inode from file info on Unix systems.
|
||||
func getFileInode(info os.FileInfo) uint64 {
|
||||
if sys := info.Sys(); sys != nil {
|
||||
if stat, ok := sys.(*syscall.Stat_t); ok {
|
||||
return stat.Ino
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
Reference in New Issue
Block a user