support api templates

This commit is contained in:
kevin
2020-10-15 16:36:49 +08:00
parent 8291eabc2c
commit f904710811
32 changed files with 274 additions and 155 deletions

View File

@@ -4,6 +4,7 @@ import (
"fmt"
"path/filepath"
"github.com/tal-tech/go-zero/tools/goctl/templatex"
"github.com/tal-tech/go-zero/tools/goctl/util"
)
@@ -22,7 +23,7 @@ func (g *defaultRpcGenerator) genEtc() error {
return nil
}
return util.With("etc").Parse(etcTemplate).SaveTo(map[string]interface{}{
return templatex.With("etc").Parse(etcTemplate).SaveTo(map[string]interface{}{
"serviceName": g.Ctx.ServiceName.Lower(),
}, fileName, false)
}