beego:parse judge weather the commentsRouter exist
Showing
1 changed file
with
3 additions
and
0 deletions
| ... | @@ -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 { | ... | ... |
-
Please register or sign in to post a comment