Skip to content

Commit

Permalink
code cleanup: use variable in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
charlievieth committed Dec 17, 2024
1 parent b824634 commit a77a2ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sqlite3.go
Original file line number Diff line number Diff line change
Expand Up @@ -1207,9 +1207,9 @@ func (c *SQLiteConn) query(ctx context.Context, query string, args []driver.Name
if n := len(args); n != na {
s.finalize()
if n < na {
return nil, fmt.Errorf("not enough args to execute query: want %d got %d", na, len(args))
return nil, fmt.Errorf("not enough args to execute query: want %d got %d", na, n)
}
return nil, fmt.Errorf("too many args to execute query: want %d got %d", na, len(args))
return nil, fmt.Errorf("too many args to execute query: want %d got %d", na, n)
}

rows, err := s.query(ctx, args)
Expand Down

0 comments on commit a77a2ce

Please sign in to comment.