mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-23 00:50:20 +08:00
chore: coding style (#3080)
This commit is contained in:
parent
1904af2323
commit
ee555a85da
@ -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…
Reference in New Issue
Block a user