1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-26 00:50:49 +00:00

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

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 {