mirror of
https://github.com/beego/bee.git
synced 2024-11-24 13:30:53 +00:00
move generateCode.Run() to g.go
This commit is contained in:
parent
6894c9bc55
commit
5a2394d76a
@ -103,7 +103,6 @@ var modelsList map[string]map[string]swagger.Model
|
||||
var rootapi swagger.ResourceListing
|
||||
|
||||
func init() {
|
||||
cmdGenerate.Run = generateCode
|
||||
pkgCache = make(map[string]bool)
|
||||
controllerComments = make(map[string]string)
|
||||
importlist = make(map[string]string)
|
||||
@ -638,8 +637,8 @@ func appendModels(cmpath, pkgpath, controllerName string, realTypes []string) {
|
||||
if _, ok := modelsList[pkgpath+controllerName][p+realType]; ok {
|
||||
continue
|
||||
}
|
||||
fmt.Printf(pkgpath+":"+controllerName+":"+cmpath+":"+realType+"\n")
|
||||
_, _, mod, newRealTypes := getModel(p+realType)
|
||||
fmt.Printf(pkgpath + ":" + controllerName + ":" + cmpath + ":" + realType + "\n")
|
||||
_, _, mod, newRealTypes := getModel(p + realType)
|
||||
modelsList[pkgpath+controllerName][p+realType] = mod
|
||||
appendModels(cmpath, pkgpath, controllerName, newRealTypes)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user