fix: resolve wsl_v5, lll, noinlineerr, and gosec lint issues
This commit is contained in:
@@ -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, ","),
|
||||
|
||||
Reference in New Issue
Block a user