Fix code analyzer warnings

This commit is contained in:
2024-12-30 13:20:27 -05:00
parent 5f9cc58ef7
commit 888ee5ea4a
5 changed files with 8 additions and 7 deletions

View File

@@ -67,11 +67,10 @@ func (c *Cache) LockCache() {
c.checkLock()
file, err := os.OpenFile(c.file+".lock", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o640)
defer file.Close()
if err != nil {
c.log.Fatal("Failed to lock cache", c.log.Args("error", err))
}
file.Close()
}
func (c *Cache) checkLock() {