Handle watchlist ID row close errors
This commit is contained in:
@@ -2,6 +2,7 @@ package db
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"mal/pkg/errlog"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -24,7 +25,7 @@ func (q *Queries) GetUserWatchlistAnimeIDs(ctx context.Context, userID string, a
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer func() { _ = rows.Close() }()
|
defer errlog.Close(rows, "failed to close watchlist id rows")
|
||||||
|
|
||||||
matches := make([]int64, 0, len(animeIDs))
|
matches := make([]int64, 0, len(animeIDs))
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
|
|||||||
Reference in New Issue
Block a user