25 lines
430 B
Go
25 lines
430 B
Go
package main
|
|
|
|
import (
|
|
"youtu_ecpm/dao/query"
|
|
"youtu_ecpm/pkg/config"
|
|
"youtu_ecpm/pkg/db"
|
|
"youtu_ecpm/pkg/log"
|
|
)
|
|
|
|
func main() {
|
|
|
|
// 初始化日志
|
|
zapLog := log.NewLog(config.GetLogFormat(), config.GetAppEnv(), config.GetLogLevel(), config.GetLogPath())
|
|
|
|
// 初始化数据库
|
|
q := query.Use(db.Db)
|
|
|
|
app, _, err := wireApp(zapLog, q)
|
|
if err != nil {
|
|
zapLog.Sugar().Fatal("运行失败", err)
|
|
return
|
|
}
|
|
app.Run()
|
|
}
|