You've already forked go-sqlmock
mirror of
https://github.com/DATA-DOG/go-sqlmock.git
synced 2025-07-03 00:36:52 +02:00
Modify: existing panic in AddRow to give a hint to the issue
This commit is contained in:
2
rows.go
2
rows.go
@ -166,7 +166,7 @@ func (r *Rows) RowError(row int, err error) *Rows {
|
||||
// of columns
|
||||
func (r *Rows) AddRow(values ...driver.Value) *Rows {
|
||||
if len(values) != len(r.cols) {
|
||||
panic("Expected number of values to match number of columns")
|
||||
panic(fmt.Sprintf("Expected number of values to match number of columns: expected %d, actual %d", len(values), len(r.cols)))
|
||||
}
|
||||
|
||||
row := make([]driver.Value, len(r.cols))
|
||||
|
Reference in New Issue
Block a user