From 02cdc3c79209c4a86d69688ae7dd01d099ef1119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Mon, 30 Sep 2024 15:25:58 +0800 Subject: [PATCH] fix --- router/register_router_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/router/register_router_test.go b/router/register_router_test.go index b7eae00..cc77a33 100644 --- a/router/register_router_test.go +++ b/router/register_router_test.go @@ -27,7 +27,7 @@ func TestRegisterRouter(t *testing.T) { assert.Nil(t, err, "路由注册异常 : %v", err) } -func demoApiFunc() RouterFunc { +func demoApiFunc() RegisterFunc { return func() (method string, uri string, handlerFunc gin.HandlerFunc, middlewareList []gin.HandlerFunc) { return http.MethodGet, "/api/func/test", func(context *gin.Context) { @@ -59,7 +59,7 @@ func (d demoApi) GetHandler() gin.HandlerFunc { type otherApi struct { } -func (oa *otherApi) DemoApiFunc() RouterFunc { +func (oa *otherApi) DemoApiFunc() RegisterFunc { return func() (method string, uri string, handlerFunc gin.HandlerFunc, middlewareList []gin.HandlerFunc) { return http.MethodGet, "/api/other/test", func(context *gin.Context) {