1
0
mirror of https://github.com/beego/bee.git synced 2024-12-22 10:00:50 +00:00

use filepath to generate appcode

This commit is contained in:
astaxie 2017-04-24 21:06:31 +08:00
parent ffbe29ae22
commit e84d6f9a9c

View File

@ -863,7 +863,7 @@ func writeRouterFile(tables []*Table, rPath string, selectedTables map[string]bo
nameSpaces = append(nameSpaces, nameSpace)
}
// Add export controller
fpath := path.Join(rPath, "router.go")
fpath := filepath.Join(rPath, "router.go")
routerStr := strings.Replace(RouterTPL, "{{nameSpaces}}", strings.Join(nameSpaces, ""), 1)
routerStr = strings.Replace(routerStr, "{{pkgPath}}", pkgPath, 1)
var f *os.File