[feat] 移除对 db 库的直接依赖
This commit is contained in:
@@ -5,6 +5,9 @@ import (
|
||||
"time"
|
||||
|
||||
"git.fsdpf.net/go/db/engine"
|
||||
_ "github.com/denisenkom/go-mssqldb"
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
// TestMySQLConfig 测试 MySQL 驱动的配置
|
||||
@@ -333,7 +336,7 @@ func TestToDSN(t *testing.T) {
|
||||
engine.WithPassword("password"),
|
||||
engine.WithPgSslmode("disable"),
|
||||
),
|
||||
wantDSN: "postgres://postgres:password@localhost:5432/testdb?host=localhost&port=5432&dbname=testdb&user=postgres&password=password&sslmode=disable",
|
||||
wantDSN: "host=localhost port=5432 user=postgres password=password dbname=testdb sslmode=disable",
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user