feat: refactor go.mod.

This commit is contained in:
tx7do
2024-11-14 13:04:30 +08:00
parent 3ef28da068
commit 719fa01c8d
18 changed files with 1007 additions and 469 deletions

View File

@@ -13,6 +13,10 @@ import (
// NewEntClient 创建Ent ORM数据库客户端
func NewEntClient[T ClientInterface](cfg *conf.Bootstrap, l *log.Helper, db T) *ClientWrapper[T] {
if cfg.Data == nil || cfg.Data.Database == nil {
l.Warn("database config is nil")
return nil
}
drv, err := CreateDriver(
cfg.Data.Database.GetDriver(),