From bbd31131a4264063eada8c32849f4eaae70eca7d Mon Sep 17 00:00:00 2001 From: astaxie Date: Sat, 2 Aug 2014 10:11:45 +0800 Subject: [PATCH] beego:parse judge weather the commentsRouter exist --- parser.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/parser.go b/parser.go index f8818295..1356f6ae 100644 --- a/parser.go +++ b/parser.go @@ -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 {