support api templates
This commit is contained in:
@@ -2,13 +2,13 @@ package gen
|
||||
|
||||
import (
|
||||
"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"
|
||||
)
|
||||
|
||||
func genFindOne(table Table, withCache bool) (string, error) {
|
||||
camel := table.Name.ToCamel()
|
||||
output, err := util.With("findOne").
|
||||
output, err := templatex.With("findOne").
|
||||
Parse(template.FindOne).
|
||||
Execute(map[string]interface{}{
|
||||
"withCache": withCache,
|
||||
|
||||
Reference in New Issue
Block a user