feat: 初始化gorm连接信息

This commit is contained in:
Blizzard
2025-04-26 00:05:31 +08:00
parent 689d26a055
commit 101a912652
7 changed files with 170 additions and 28 deletions
+3 -4
View File
@@ -4,6 +4,7 @@ import (
"go.uber.org/zap"
"sundynix-go/core"
"sundynix-go/global"
"sundynix-go/initialize"
)
func main() {
@@ -13,9 +14,7 @@ func main() {
global.Logger = core.Zap()
//替换zap
zap.ReplaceGlobals(global.Logger)
global.Logger.Info("this is debug log")
global.Logger.Debug("this is debug log")
global.Logger.Error("this is error log")
//初始化gorm 连接数据库
global.DB = initialize.Gorm()
}