xdd-plus/models/init.go

36 lines
475 B
Go
Raw Normal View History

2021-08-15 09:48:05 +08:00
package models
import (
"os"
"path/filepath"
"github.com/beego/beego/v2/core/logs"
)
var test2 = func(string) {
}
2021-08-15 09:48:05 +08:00
func init() {
killp()
for _, arg := range os.Args {
if arg == "-d" {
Daemon()
}
}
ExecPath, _ = filepath.Abs(filepath.Dir(os.Args[0]))
logs.Info("当前%s", ExecPath)
initConfig()
initDB()
go initVersion()
go initUserAgent()
initContainer()
initHandle()
initCron()
go initTgBot()
InitReplies()
2021-08-16 19:23:59 +08:00
initTask()
2021-08-21 17:12:13 +08:00
initRepos()
2021-09-07 01:19:40 +08:00
intiSky()
2021-08-15 09:48:05 +08:00
}