diff --git a/tools/goctl/gateway/cmd.go b/tools/goctl/gateway/cmd.go index 44b0d09f..b7b38427 100644 --- a/tools/goctl/gateway/cmd.go +++ b/tools/goctl/gateway/cmd.go @@ -28,11 +28,11 @@ func init() { } func generateGateway(*cobra.Command, []string) error { - if err:=pathx.MkdirIfNotExist(varStringDir);err!=nil{ + if err := pathx.MkdirIfNotExist(varStringDir); err != nil { return err } - if _,err:=ctx.Prepare(varStringDir);err!=nil{ + if _, err := ctx.Prepare(varStringDir); err != nil { return err } diff --git a/tools/goctl/gateway/template.go b/tools/goctl/gateway/template.go index 64ebd7ab..6979ebc8 100644 --- a/tools/goctl/gateway/template.go +++ b/tools/goctl/gateway/template.go @@ -8,9 +8,9 @@ import ( ) const ( - category = "gateway" - etcTemplateFileFile = "etc.tpl" - mainTemplateFile = "main.tpl" + category = "gateway" + etcTemplateFileFile = "etc.tpl" + mainTemplateFile = "main.tpl" ) //go:embed conf.yml @@ -19,10 +19,9 @@ var etcTemplate string //go:embed gateway.tpl var mainTemplate string - var templates = map[string]string{ - etcTemplateFileFile: etcTemplate, - mainTemplateFile: mainTemplate, + etcTemplateFileFile: etcTemplate, + mainTemplateFile: mainTemplate, } // GenTemplates is the entry for command goctl template,