We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c35a79d + ad48e46 commit 07eed2aCopy full SHA for 07eed2a
expectations.go
@@ -230,12 +230,13 @@ func (e *ExpectedExec) String() string {
230
}
231
232
if e.result != nil {
233
- res, _ := e.result.(*result)
234
- msg += "\n - should return Result having:"
235
- msg += fmt.Sprintf("\n LastInsertId: %d", res.insertID)
236
- msg += fmt.Sprintf("\n RowsAffected: %d", res.rowsAffected)
237
- if res.err != nil {
238
- msg += fmt.Sprintf("\n Error: %s", res.err)
+ if res, ok := e.result.(*result); ok {
+ msg += "\n - should return Result having:"
+ msg += fmt.Sprintf("\n LastInsertId: %d", res.insertID)
+ msg += fmt.Sprintf("\n RowsAffected: %d", res.rowsAffected)
+ if res.err != nil {
+ msg += fmt.Sprintf("\n Error: %s", res.err)
239
+ }
240
241
242
0 commit comments