mirror of
https://github.com/beego/bee.git
synced 2024-11-23 11:50:55 +00:00
Trim controller filename
This commit is contained in:
parent
cac26ff191
commit
6e4b27841c
@ -61,7 +61,7 @@ type MvcPath struct {
|
|||||||
ModelPath string
|
ModelPath string
|
||||||
ControllerPath string
|
ControllerPath string
|
||||||
RouterPath string
|
RouterPath string
|
||||||
StructurePath string
|
StructurePath string
|
||||||
}
|
}
|
||||||
|
|
||||||
// typeMapping maps SQL data type to corresponding Go data type
|
// 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)
|
filename := getFileName(tb.Name)
|
||||||
fpath := path.Join(mPath, filename + "_structure.go")
|
fpath := path.Join(mPath, filename+"_structure.go")
|
||||||
var f *os.File
|
var f *os.File
|
||||||
var err error
|
var err error
|
||||||
if isExist(fpath) {
|
if isExist(fpath) {
|
||||||
@ -863,7 +863,7 @@ func writeControllerFiles(tables []*Table, cPath string, selectedTables map[stri
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
filename := getFileName(tb.Name)
|
filename := getFileName(tb.Name)
|
||||||
fpath := path.Join(cPath, filename+".go")
|
fpath := path.Join(cPath, filename+"_controller.go")
|
||||||
var f *os.File
|
var f *os.File
|
||||||
var err error
|
var err error
|
||||||
if isExist(fpath) {
|
if isExist(fpath) {
|
||||||
|
Loading…
Reference in New Issue
Block a user