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:
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