feat: 初始化gorm连接信息
This commit is contained in:
@@ -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()
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user