|
package sqlite
|
|
|
|
import (
|
|
"database/sql"
|
|
"log"
|
|
|
|
_ "github.com/mattn/go-sqlite3"
|
|
)
|
|
|
|
func NewMockSqliteDB() *sql.DB {
|
|
db, err := sql.Open("sqlite3", ":memory:")
|
|
if err != nil {
|
|
log.Fatalf("an error '%s' was not expected when opening a stub database connection", err)
|
|
}
|
|
|
|
return db
|
|
}
|