From 57299a75971018ea1a56dde931ea0284510e63b8 Mon Sep 17 00:00:00 2001 From: kevin Date: Sun, 20 Sep 2020 09:15:19 +0800 Subject: [PATCH] rename ngin to rest in goctl --- tools/goctl/api/gogen/genroutes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/goctl/api/gogen/genroutes.go b/tools/goctl/api/gogen/genroutes.go index 20783095..74f5d3cb 100644 --- a/tools/goctl/api/gogen/genroutes.go +++ b/tools/goctl/api/gogen/genroutes.go @@ -81,11 +81,11 @@ func genRoutes(dir string, api *spec.ApiSpec, force bool) error { } var jwt string if g.jwtEnabled { - jwt = fmt.Sprintf(", ngin.WithJwt(serverCtx.Config.%s.AccessSecret)", g.authName) + jwt = fmt.Sprintf(", rest.WithJwt(serverCtx.Config.%s.AccessSecret)", g.authName) } var signature string if g.signatureEnabled { - signature = fmt.Sprintf(", ngin.WithSignature(serverCtx.Config.%s.Signature)", g.authName) + signature = fmt.Sprintf(", rest.WithSignature(serverCtx.Config.%s.Signature)", g.authName) } if err := gt.Execute(&builder, map[string]string{ "routes": strings.TrimSpace(gbuilder.String()),