use goctl template to generate all kinds of templates
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/tal-tech/go-zero/tools/goctl/templatex"
|
||||
"github.com/tal-tech/go-zero/tools/goctl/util"
|
||||
)
|
||||
|
||||
@@ -23,7 +22,7 @@ func (g *defaultRpcGenerator) genEtc() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
return templatex.With("etc").Parse(etcTemplate).SaveTo(map[string]interface{}{
|
||||
return util.With("etc").Parse(etcTemplate).SaveTo(map[string]interface{}{
|
||||
"serviceName": g.Ctx.ServiceName.Lower(),
|
||||
}, fileName, false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user