From d42efe492e859605f238a5954be108742da2e6b2 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sun, 1 Oct 2023 22:22:20 +0800 Subject: [PATCH] 1 --- app.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app.go b/app.go index 9ddd3fc..3c10b90 100644 --- a/app.go +++ b/app.go @@ -42,6 +42,7 @@ type UserApp interface { Init() Update() UnInit() + GetHttpListenPort() int32 } type app struct { @@ -118,6 +119,7 @@ func (this *app) init(userApp UserApp) { this.ginEngine = gin.New() this.ginEngine.Use(gin.Recovery()) this.userApp.Init() + go this.ginEngine.Run(fmt.Sprintf(":%s", this.userApp.GetHttpListenPort())) } func (this *app) unInit() {