bbd31131 by astaxie

beego:parse judge weather the commentsRouter exist

1 parent 509af636
...@@ -159,6 +159,9 @@ func genRouterCode() { ...@@ -159,6 +159,9 @@ func genRouterCode() {
159 } 159 }
160 160
161 func compareFile(pkgRealpath string) bool { 161 func compareFile(pkgRealpath string) bool {
162 if !utils.FileExists(path.Join(AppPath, "routers", "commentsRouter.go")) {
163 return true
164 }
162 if utils.FileExists(path.Join(AppPath, lastupdateFilename)) { 165 if utils.FileExists(path.Join(AppPath, lastupdateFilename)) {
163 content, err := ioutil.ReadFile(path.Join(AppPath, lastupdateFilename)) 166 content, err := ioutil.ReadFile(path.Join(AppPath, lastupdateFilename))
164 if err != nil { 167 if err != nil {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!