MCPcopy Index your code
hub / github.com/TruthHun/DocHub / Init

Function Init

models/Models.go:51–65  ·  view source on GitHub ↗

初始化数据库注册

()

Source from the content-addressed store, hash-verified

49
50//初始化数据库注册
51func Init() {
52 //初始化数据库
53 RegisterDB()
54 runmode := beego.AppConfig.String("runmode")
55 if runmode == "prod" {
56 orm.Debug = false
57 orm.RunSyncdb("default", false, false)
58 } else {
59 orm.Debug = true
60 orm.RunSyncdb("default", false, true)
61 }
62 //安装初始数据
63 install()
64 AutoSitemap()
65}
66
67//注册数据库
68func RegisterDB() {

Callers 1

initFunction · 0.85

Calls 3

RegisterDBFunction · 0.85
installFunction · 0.85
AutoSitemapFunction · 0.85

Tested by

no test coverage detected