fix: fix gosec and err checl
Some checks failed
build / build (push) Failing after 3m10s

This commit is contained in:
d3m0k1d
2026-01-21 22:30:27 +03:00
parent de000ab5b6
commit 211e019c68
4 changed files with 11 additions and 4 deletions

View File

@@ -25,9 +25,13 @@ func Write(db *DB, resultCh <-chan *LogEntry) {
}
stmt, err := tx.Prepare(
"INSERT INTO requests (service, ip, path, method, status, created_at) VALUES (?, ?, ?, ?, ?, ?)")
"INSERT INTO requests (service, ip, path, method, status, created_at) VALUES (?, ?, ?, ?, ?, ?)",
)
if err != nil {
tx.Rollback()
err := tx.Rollback()
if err != nil {
db.logger.Error("Failed to rollback transaction", "error", err)
}
db.logger.Error("Failed to prepare statement", "error", err)
return
}