支持在router实力上自行注册路由

This commit is contained in:
白茶清欢 2025-02-22 16:14:55 +08:00
parent 1de0715637
commit 01b62b6eee

View File

@ -143,6 +143,18 @@ func (s *server) Handler404(f gin.HandlerFunc) {
s.router.NoRoute(f)
}
// SetCustomRouter 自定义路由处理
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 16:09 2025/2/22
func (s *server) SetCustomRouter(f func(r *gin.Engine)) {
if nil == f {
return
}
f(s.router)
}
// Group 注册接口路由
//
// Author : go_developer@163.com<白茶清欢>