use filepath to generate appcode

This commit is contained in:
astaxie 2017-04-24 21:06:31 +08:00
parent ffbe29ae22
commit e84d6f9a9c
1 changed files with 1 additions and 1 deletions

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