package main import ( "eta/eta_report/controllers" _ "eta/eta_report/routers" "eta/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() }