From 6e4b27841c24c09747d0d8831322c70bddd2db86 Mon Sep 17 00:00:00 2001 From: MingZong Date: Wed, 30 Mar 2016 18:35:41 +0800 Subject: [PATCH] Trim controller filename --- g_appcode.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/g_appcode.go b/g_appcode.go index cfcdb24..3b7006f 100644 --- a/g_appcode.go +++ b/g_appcode.go @@ -61,7 +61,7 @@ type MvcPath struct { ModelPath string ControllerPath string RouterPath string - StructurePath string + StructurePath string } // typeMapping maps SQL data type to corresponding Go data type @@ -805,7 +805,7 @@ func writeStructureFiles(tables []*Table, mPath string, selectedTables map[strin } } filename := getFileName(tb.Name) - fpath := path.Join(mPath, filename + "_structure.go") + fpath := path.Join(mPath, filename+"_structure.go") var f *os.File var err error if isExist(fpath) { @@ -863,7 +863,7 @@ func writeControllerFiles(tables []*Table, cPath string, selectedTables map[stri continue } filename := getFileName(tb.Name) - fpath := path.Join(cPath, filename+".go") + fpath := path.Join(cPath, filename+"_controller.go") var f *os.File var err error if isExist(fpath) {