Browse Source

rename ngin to rest in goctl

kevin 4 years ago
parent
commit
57299a7597
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tools/goctl/api/gogen/genroutes.go

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