support api templates
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/tal-tech/go-zero/core/collection"
|
||||
"github.com/tal-tech/go-zero/tools/goctl/model/sql/template"
|
||||
"github.com/tal-tech/go-zero/tools/goctl/util"
|
||||
"github.com/tal-tech/go-zero/tools/goctl/templatex"
|
||||
"github.com/tal-tech/go-zero/tools/goctl/util/stringx"
|
||||
)
|
||||
|
||||
@@ -34,7 +34,7 @@ func genInsert(table Table, withCache bool) (string, error) {
|
||||
expressionValues = append(expressionValues, "data."+camel)
|
||||
}
|
||||
camel := table.Name.ToCamel()
|
||||
output, err := util.With("insert").
|
||||
output, err := templatex.With("insert").
|
||||
Parse(template.Insert).
|
||||
Execute(map[string]interface{}{
|
||||
"withCache": withCache,
|
||||
|
||||
Reference in New Issue
Block a user