chore: coding style (#3080)

master
Kevin Wan 2 years ago committed by GitHub
parent 1904af2323
commit ee555a85da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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
}

@ -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,

Loading…
Cancel
Save