1
This commit is contained in:
parent
6c34f7de11
commit
d42efe492e
2
app.go
2
app.go
@ -42,6 +42,7 @@ type UserApp interface {
|
|||||||
Init()
|
Init()
|
||||||
Update()
|
Update()
|
||||||
UnInit()
|
UnInit()
|
||||||
|
GetHttpListenPort() int32
|
||||||
}
|
}
|
||||||
|
|
||||||
type app struct {
|
type app struct {
|
||||||
@ -118,6 +119,7 @@ func (this *app) init(userApp UserApp) {
|
|||||||
this.ginEngine = gin.New()
|
this.ginEngine = gin.New()
|
||||||
this.ginEngine.Use(gin.Recovery())
|
this.ginEngine.Use(gin.Recovery())
|
||||||
this.userApp.Init()
|
this.userApp.Init()
|
||||||
|
go this.ginEngine.Run(fmt.Sprintf(":%s", this.userApp.GetHttpListenPort()))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *app) unInit() {
|
func (this *app) unInit() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user