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) {