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.
30 lines
723 B
30 lines
723 B
package main |
|
|
|
import ( |
|
_ "github.com/gogf/gf/contrib/drivers/mysql/v2" |
|
//_ "github.com/gogf/gf/contrib/nosql/redis/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" |
|
_ "tyj_admin/internal/serviceGame" |
|
) |
|
|
|
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()) |
|
}
|
|
|