mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 10:40:55 +00:00
beego:parse judge weather the commentsRouter exist
This commit is contained in:
parent
509af636b1
commit
bbd31131a4
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user