mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 20:10:56 +00:00
fix when delete the commentsRouter.go
This commit is contained in:
commit
f4147058fc
2
cache/cache.go
vendored
2
cache/cache.go
vendored
@ -16,7 +16,7 @@ import (
|
||||
// Cache interface contains all behaviors for cache adapter.
|
||||
// usage:
|
||||
// cache.Register("file",cache.NewFileCache()) // this operation is run in init method of file.go.
|
||||
// c := cache.NewCache("file","{....}")
|
||||
// c,err := cache.NewCache("file","{....}")
|
||||
// c.Put("key",value,3600)
|
||||
// v := c.Get("key")
|
||||
//
|
||||
|
@ -158,6 +158,9 @@ func genRouterCode() {
|
||||
}
|
||||
|
||||
func compareFile(pkgRealpath string) bool {
|
||||
if !utils.FileExists(path.Join(workPath, "routers", "commentsRouter.go")) {
|
||||
return true
|
||||
}
|
||||
if utils.FileExists(path.Join(workPath, lastupdateFilename)) {
|
||||
content, err := ioutil.ReadFile(path.Join(workPath, lastupdateFilename))
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user