Browse Source

fix(mongo): fix file name generation errors (#2479)

Before this, no matter what style is used, lowercase file names without underscores will be generated.
foliet 2 năm trước cách đây
mục cha
commit
b51339b69b
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      tools/goctl/model/mongo/generate/generate.go

+ 1 - 1
tools/goctl/model/mongo/generate/generate.go

@@ -97,7 +97,7 @@ func generateCustomModel(ctx *Context) error {
 
 func generateTypes(ctx *Context) error {
 	for _, t := range ctx.Types {
-		fn, err := format.FileNamingFormat(ctx.Cfg.NamingFormat, t+"types")
+		fn, err := format.FileNamingFormat(ctx.Cfg.NamingFormat, t+"_types")
 		if err != nil {
 			return err
 		}