Implement first db-test using go-txdb
This commit is contained in:
@ -18,8 +18,8 @@ type Database struct {
|
||||
}
|
||||
|
||||
// Connect to a database
|
||||
func Connect(connString string) (*Database, error) {
|
||||
conn, err := sql.Open("pgx", connString)
|
||||
func Connect(typ string, connString string) (*Database, error) {
|
||||
conn, err := sql.Open(typ, connString)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("open connection: %w", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user