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()),