feat: 新增简易版ioc

This commit is contained in:
meilin.huang
2024-01-21 22:52:20 +08:00
parent f4a64b96a9
commit f27d3d200f
106 changed files with 815 additions and 707 deletions

View File

@@ -2,7 +2,7 @@ package router
import (
"mayfly-go/internal/msg/api"
"mayfly-go/internal/msg/application"
"mayfly-go/pkg/ioc"
"mayfly-go/pkg/req"
"github.com/gin-gonic/gin"
@@ -10,9 +10,9 @@ import (
func InitMsgRouter(router *gin.RouterGroup) {
msg := router.Group("msgs")
a := &api.Msg{
MsgApp: application.GetMsgApp(),
}
a := new(api.Msg)
ioc.Inject(a)
req.NewGet("/self", a.GetMsgs).Group(msg)
}