mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-25 02:20:30 +08:00
feat: 新增简易版ioc
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user