fix(goctl): model method FindOneCtx should be FindOne (#1656)

This commit is contained in:
Fyn
2022-03-17 17:16:53 +08:00
committed by GitHub
parent 18916b5189
commit 17e0afeac0

View File

@@ -3,7 +3,7 @@ package template
// Delete defines a delete template
var Delete = `
func (m *default{{.upperStartCamelObject}}Model) Delete(ctx context.Context, {{.lowerStartCamelPrimaryKey}} {{.dataType}}) error {
{{if .withCache}}{{if .containsIndexCache}}data, err:=m.FindOneCtx(ctx, {{.lowerStartCamelPrimaryKey}})
{{if .withCache}}{{if .containsIndexCache}}data, err:=m.FindOne(ctx, {{.lowerStartCamelPrimaryKey}})
if err!=nil{
return err
}