From 01b62b6eeeec13d7986e91ed0ed920b5859f12b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Sat, 22 Feb 2025 16:14:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=9C=A8router=E5=AE=9E?= =?UTF-8?q?=E5=8A=9B=E4=B8=8A=E8=87=AA=E8=A1=8C=E6=B3=A8=E5=86=8C=E8=B7=AF?= =?UTF-8?q?=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- router/server.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/router/server.go b/router/server.go index f317670..16058a6 100644 --- a/router/server.go +++ b/router/server.go @@ -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<白茶清欢>