mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 14:20:54 +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.
|
// Cache interface contains all behaviors for cache adapter.
|
||||||
// usage:
|
// usage:
|
||||||
// cache.Register("file",cache.NewFileCache()) // this operation is run in init method of file.go.
|
// 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)
|
// c.Put("key",value,3600)
|
||||||
// v := c.Get("key")
|
// v := c.Get("key")
|
||||||
//
|
//
|
||||||
|
@ -158,6 +158,9 @@ func genRouterCode() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func compareFile(pkgRealpath string) bool {
|
func compareFile(pkgRealpath string) bool {
|
||||||
|
if !utils.FileExists(path.Join(workPath, "routers", "commentsRouter.go")) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
if utils.FileExists(path.Join(workPath, lastupdateFilename)) {
|
if utils.FileExists(path.Join(workPath, lastupdateFilename)) {
|
||||||
content, err := ioutil.ReadFile(path.Join(workPath, lastupdateFilename))
|
content, err := ioutil.ReadFile(path.Join(workPath, lastupdateFilename))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user