beego:parse judge weather the commentsRouter exist

This commit is contained in:
astaxie 2014-08-02 10:11:45 +08:00
parent 509af636b1
commit bbd31131a4
1 changed files with 3 additions and 0 deletions

View File

@ -159,6 +159,9 @@ func genRouterCode() {
}
func compareFile(pkgRealpath string) bool {
if !utils.FileExists(path.Join(AppPath, "routers", "commentsRouter.go")) {
return true
}
if utils.FileExists(path.Join(AppPath, lastupdateFilename)) {
content, err := ioutil.ReadFile(path.Join(AppPath, lastupdateFilename))
if err != nil {