fix: resolve nlreturn, modernize, perfsprint, wsl_v5, and partial err113 lint issues
This commit is contained in:
@@ -90,6 +90,7 @@ func NewTest(dsn string) (*Database, error) {
|
||||
// Item 9: Enable foreign keys
|
||||
if _, err := d.Exec("PRAGMA foreign_keys = ON"); err != nil {
|
||||
_ = d.Close()
|
||||
|
||||
return nil, fmt.Errorf("enable foreign keys: %w", err)
|
||||
}
|
||||
|
||||
@@ -219,6 +220,7 @@ func (s *Database) DeleteAuthToken(
|
||||
_, err := s.db.ExecContext(ctx,
|
||||
`DELETE FROM auth_tokens WHERE token = ?`, token,
|
||||
)
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -231,6 +233,7 @@ func (s *Database) UpdateUserLastSeen(
|
||||
`UPDATE users SET last_seen_at = CURRENT_TIMESTAMP WHERE id = ?`,
|
||||
userID,
|
||||
)
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -394,6 +397,7 @@ func (s *Database) DequeueMessages(
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
defer func() { _ = rows.Close() }()
|
||||
|
||||
entries := []*models.MessageQueueEntry{}
|
||||
@@ -423,7 +427,7 @@ func (s *Database) AckMessages(
|
||||
}
|
||||
|
||||
placeholders := make([]string, len(entryIDs))
|
||||
args := make([]interface{}, len(entryIDs))
|
||||
args := make([]any, len(entryIDs))
|
||||
|
||||
for i, id := range entryIDs {
|
||||
placeholders[i] = "?"
|
||||
|
||||
Reference in New Issue
Block a user