MustScan scans the given row and fails a test in case of any errors
(t *testing.T, message string, row *sql.Row, args ...interface{})
| 37 | |
| 38 | // MustScan scans the given row and fails a test in case of any errors |
| 39 | func MustScan(t *testing.T, message string, row *sql.Row, args ...interface{}) { |
| 40 | err := row.Scan(args...) |
| 41 | if err != nil { |
| 42 | t.Fatal(errors.Wrap(errors.Wrap(err, "scanning a row"), message)) |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | // MustExec executes the given SQL query and fails a test if an error occurs |
| 47 | func MustExec(t *testing.T, message string, db *DB, query string, args ...interface{}) sql.Result { |
no outgoing calls