From 68335ada5479cc4f4b01f4fc33e14a9e13831c90 Mon Sep 17 00:00:00 2001 From: miaogaolin <57740293+miaogaolin@users.noreply.github.com> Date: Wed, 16 Sep 2020 13:30:47 +0800 Subject: [PATCH] rename file and function name (#74) --- .../model/sql/gen/{fineonebyfield.go => findonebyfield.go} | 2 +- tools/goctl/model/sql/gen/gen.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename tools/goctl/model/sql/gen/{fineonebyfield.go => findonebyfield.go} (95%) diff --git a/tools/goctl/model/sql/gen/fineonebyfield.go b/tools/goctl/model/sql/gen/findonebyfield.go similarity index 95% rename from tools/goctl/model/sql/gen/fineonebyfield.go rename to tools/goctl/model/sql/gen/findonebyfield.go index e7261dbc..4b26b7f4 100644 --- a/tools/goctl/model/sql/gen/fineonebyfield.go +++ b/tools/goctl/model/sql/gen/findonebyfield.go @@ -9,7 +9,7 @@ import ( "github.com/tal-tech/go-zero/tools/goctl/util/stringx" ) -func genFineOneByField(table Table, withCache bool) (string, error) { +func genFindOneByField(table Table, withCache bool) (string, error) { t := util.With("findOneByField").Parse(template.FindOneByField) var list []string camelTableName := table.Name.ToCamel() diff --git a/tools/goctl/model/sql/gen/gen.go b/tools/goctl/model/sql/gen/gen.go index a604bacb..1b1fe449 100644 --- a/tools/goctl/model/sql/gen/gen.go +++ b/tools/goctl/model/sql/gen/gen.go @@ -162,7 +162,7 @@ func (g *defaultGenerator) genModel(in parser.Table, withCache bool) (string, er return "", err } - findOneByFieldCode, err := genFineOneByField(table, withCache) + findOneByFieldCode, err := genFindOneByField(table, withCache) if err != nil { return "", err }