You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
637 B
28 lines
637 B
3 years ago
|
package main
|
||
|
|
||
|
import (
|
||
|
_ "github.com/gogf/gf/contrib/drivers/mysql/v2"
|
||
|
"github.com/gogf/gf/v2/frame/g"
|
||
|
"github.com/gogf/gf/v2/os/gctx"
|
||
|
"github.com/gogf/gf/v2/os/glog"
|
||
|
"tyj_admin/internal/cmd"
|
||
|
_ "tyj_admin/internal/packed"
|
||
|
"tyj_admin/internal/service"
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
ctx := gctx.New()
|
||
|
if service.SysInitConfig["autoInit"].Bool() && service.SysInit().IsCreateConfigFile() {
|
||
|
// 加载配置文件
|
||
|
err := service.SysInit().LoadConfigFile()
|
||
|
if err != nil {
|
||
|
g.Log().Panic(ctx, err)
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func main() {
|
||
|
g.Log().SetFlags(glog.F_ASYNC | glog.F_TIME_DATE | glog.F_TIME_TIME | glog.F_FILE_LONG)
|
||
|
cmd.Main.Run(gctx.New())
|
||
|
}
|