Commit f4147058 authored by astaxie's avatar astaxie

fix when delete the commentsRouter.go

parents 1fb24aca 289f050c
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment