mirror of
https://github.com/DATA-DOG/go-sqlmock.git
synced 2025-05-15 22:06:43 +02:00
Merge pull request #249 from maguro/magurl/fix-exepectexec-stringer
Fix ExpectedExec Stringer implementation
This commit is contained in:
commit
07eed2a098
@ -230,12 +230,13 @@ func (e *ExpectedExec) String() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if e.result != nil {
|
if e.result != nil {
|
||||||
res, _ := e.result.(*result)
|
if res, ok := e.result.(*result); ok {
|
||||||
msg += "\n - should return Result having:"
|
msg += "\n - should return Result having:"
|
||||||
msg += fmt.Sprintf("\n LastInsertId: %d", res.insertID)
|
msg += fmt.Sprintf("\n LastInsertId: %d", res.insertID)
|
||||||
msg += fmt.Sprintf("\n RowsAffected: %d", res.rowsAffected)
|
msg += fmt.Sprintf("\n RowsAffected: %d", res.rowsAffected)
|
||||||
if res.err != nil {
|
if res.err != nil {
|
||||||
msg += fmt.Sprintf("\n Error: %s", res.err)
|
msg += fmt.Sprintf("\n Error: %s", res.err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user