package main import ( "eta_gn/eta_report/controllers" _ "eta_gn/eta_report/routers" "eta_gn/eta_report/services" "github.com/beego/beego/v2/server/web" ) func main() { if web.BConfig.RunMode == "dev" { web.BConfig.WebConfig.DirectoryIndex = true web.BConfig.WebConfig.StaticDir["/swagger"] = "swagger" } go services.InitTask() // 异常处理 web.ErrorController(&controllers.ErrorController{}) web.Run() }