fix: resolve wsl_v5, lll, noinlineerr, and gosec lint issues

This commit is contained in:
user
2026-02-20 03:26:06 -08:00
parent db3b0bfee1
commit e0da78f17c
4 changed files with 14 additions and 4 deletions

View File

@@ -88,7 +88,8 @@ func NewTest(dsn string) (*Database, error) {
}
// Item 9: Enable foreign keys
if _, err := d.ExecContext(context.Background(), "PRAGMA foreign_keys = ON"); err != nil {
_, err = d.ExecContext(context.Background(), "PRAGMA foreign_keys = ON")
if err != nil {
_ = d.Close()
return nil, fmt.Errorf("enable foreign keys: %w", err)
@@ -434,6 +435,7 @@ func (s *Database) AckMessages(
args[i] = id
}
//nolint:gosec // G201: placeholders are all "?" literals, not user input
query := fmt.Sprintf(
"DELETE FROM message_queue WHERE id IN (%s)",
strings.Join(placeholders, ","),