Skip to content

Commit

Permalink
Make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanslade committed Jan 7, 2025
1 parent 418ff81 commit d64ba26
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,10 @@ func sleepCtx(ctx context.Context, d time.Duration) error {
// ScanFirstValue is a helper function to scan the first value with the assumption that Rows contains
// a single row with a single value.
func ScanFirstValue[T any](rows *sql.Rows, dest *T) error {
for rows.Next() {
if rows.Next() {
if err := rows.Scan(dest); err != nil {
return err
}
break
}
return rows.Err()
}

0 comments on commit d64ba26

Please sign in to comment.