mirror of
https://github.com/ayflying/p2p.git
synced 2026-03-04 17:29:22 +00:00
增加更新重启逻辑
This commit is contained in:
14
main.go
14
main.go
@@ -1,9 +1,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
_ "github.com/ayflying/p2p/internal/packed"
|
||||
|
||||
"github.com/ayflying/p2p/internal/consts"
|
||||
_ "github.com/ayflying/p2p/internal/logic"
|
||||
_ "github.com/ayflying/p2p/internal/packed"
|
||||
"github.com/ayflying/p2p/internal/service"
|
||||
|
||||
//步骤1:加载驱动
|
||||
_ "github.com/gogf/gf/contrib/nosql/redis/v2"
|
||||
@@ -12,6 +13,13 @@ import (
|
||||
"github.com/gogf/gf/v2/os/gctx"
|
||||
)
|
||||
|
||||
var (
|
||||
ctx = gctx.GetInitCtx()
|
||||
)
|
||||
|
||||
func main() {
|
||||
cmd.Main.Run(gctx.GetInitCtx())
|
||||
// 启动系统托盘
|
||||
service.OS().Load(consts.Name, consts.Name+"服务端", "manifest/images/favicon.ico")
|
||||
|
||||
cmd.Main.Run(ctx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user