Implement first db-test using go-txdb

This commit is contained in:
jacob1123 committed 2022-02-09 22:40:35 +00:00
1 parent c3db535e10
commit 6ab8a96888
4 files changed
+60 -29

No files matched your search

+2 -2
View File
@@ -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)
}