mirror of
https://github.com/neilalexander/yggmail.git
synced 2026-04-19 16:46:29 +03:00
Lint in CI
This commit is contained in:
@@ -86,7 +86,7 @@ func (w *Writer) Do(db *sql.DB, txn *sql.Tx, f func(txn *sql.Tx) error) error {
|
||||
}
|
||||
|
||||
func (w *Writer) run() {
|
||||
if !w.running.CAS(false, true) {
|
||||
if !w.running.CompareAndSwap(false, true) {
|
||||
return
|
||||
}
|
||||
defer w.running.Store(false)
|
||||
|
||||
@@ -110,7 +110,7 @@ func (t *TableMailboxes) MailboxList(onlySubscribed bool) ([]string, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("t.listMailboxes.Query: %w", err)
|
||||
}
|
||||
defer rows.Close()
|
||||
defer rows.Close() // nolint:errcheck
|
||||
var mailboxes []string
|
||||
for rows.Next() {
|
||||
var mailbox string
|
||||
|
||||
@@ -200,7 +200,7 @@ func (t *TableMails) MailSearch(mailbox string) ([]uint32, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("t.searchMail.Query: %w", err)
|
||||
}
|
||||
defer rows.Close()
|
||||
defer rows.Close() // nolint:errcheck
|
||||
for rows.Next() {
|
||||
var id uint32
|
||||
if err := rows.Scan(&id); err != nil {
|
||||
|
||||
@@ -98,7 +98,7 @@ func (t *TableQueue) QueueListDestinations() ([]string, error) {
|
||||
}
|
||||
return nil, fmt.Errorf("t.queueSelectDestinations.Query: %w", err)
|
||||
}
|
||||
defer rows.Close()
|
||||
defer rows.Close() // nolint:errcheck
|
||||
var destinations []string
|
||||
for rows.Next() {
|
||||
var destination string
|
||||
@@ -118,7 +118,7 @@ func (t *TableQueue) QueueMailIDsForDestination(destination string) ([]types.Que
|
||||
}
|
||||
return nil, fmt.Errorf("t.queueSelectDestinations.Query: %w", err)
|
||||
}
|
||||
defer rows.Close()
|
||||
defer rows.Close() // nolint:errcheck
|
||||
var ids []types.QueuedMail
|
||||
for rows.Next() {
|
||||
var id int
|
||||
|
||||
Reference in New Issue
Block a user