"feat(socket): 添加跨域请求处理并集成enum依赖,优化TCP连接数据注入"

This commit is contained in:
1
2025-06-22 00:50:40 +00:00
parent ef3ce43a14
commit 8c9fbbb3a8
38 changed files with 728 additions and 409 deletions

View File

@@ -0,0 +1,27 @@
package cool
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/util/gconv"
)
type IControllerSimple interface {
}
type ControllerSimple struct {
Prefix string
}
// 注册不带crud的路由
func RegisterControllerSimple(c IControllerSimple) {
var sController = &ControllerSimple{}
// var sService = &Service{}
gconv.Struct(c, &sController)
g.Server().Group(
sController.Prefix, func(group *ghttp.RouterGroup) {
group.Middleware(MiddlewareHandlerResponse)
group.Bind(
c,
)
})
}