https://zhuanlan.zhihu.com/p/479189070
func main() { sh, err := time.LoadLocation("Asia/Shanghai") //设置时区 if err != nil { sh = time.FixedZone("CST", 8*3600) //替换上海时区 } time.Local = sh if beego.BConfig.RunMode == "dev" { beego.BConfig.WebConfig.DirectoryIndex = true beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger" } beego.Run() }
标签:beego,mongo,BConfig,问题,sh,time,go From: https://www.cnblogs.com/angdh/p/16847853.html