mirror of https://github.com/status-im/go-waku.git
18 lines
288 B
Go
18 lines
288 B
Go
|
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
|
||
|
}
|