mirror of
https://github.com/casbin/bee.git
synced 2025-07-16 06:44:20 +08:00
use filepath to generate appcode
This commit is contained in:
@ -863,7 +863,7 @@ func writeRouterFile(tables []*Table, rPath string, selectedTables map[string]bo
|
|||||||
nameSpaces = append(nameSpaces, nameSpace)
|
nameSpaces = append(nameSpaces, nameSpace)
|
||||||
}
|
}
|
||||||
// Add export controller
|
// 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(RouterTPL, "{{nameSpaces}}", strings.Join(nameSpaces, ""), 1)
|
||||||
routerStr = strings.Replace(routerStr, "{{pkgPath}}", pkgPath, 1)
|
routerStr = strings.Replace(routerStr, "{{pkgPath}}", pkgPath, 1)
|
||||||
var f *os.File
|
var f *os.File
|
||||||
|
Reference in New Issue
Block a user