f4147058 by astaxie

fix when delete the commentsRouter.go

2 parents 1fb24aca 289f050c
...@@ -16,7 +16,7 @@ import ( ...@@ -16,7 +16,7 @@ import (
16 // Cache interface contains all behaviors for cache adapter. 16 // Cache interface contains all behaviors for cache adapter.
17 // usage: 17 // usage:
18 // cache.Register("file",cache.NewFileCache()) // this operation is run in init method of file.go. 18 // cache.Register("file",cache.NewFileCache()) // this operation is run in init method of file.go.
19 // c := cache.NewCache("file","{....}") 19 // c,err := cache.NewCache("file","{....}")
20 // c.Put("key",value,3600) 20 // c.Put("key",value,3600)
21 // v := c.Get("key") 21 // v := c.Get("key")
22 // 22 //
......
...@@ -158,6 +158,9 @@ func genRouterCode() { ...@@ -158,6 +158,9 @@ func genRouterCode() {
158 } 158 }
159 159
160 func compareFile(pkgRealpath string) bool { 160 func compareFile(pkgRealpath string) bool {
161 if !utils.FileExists(path.Join(workPath, "routers", "commentsRouter.go")) {
162 return true
163 }
161 if utils.FileExists(path.Join(workPath, lastupdateFilename)) { 164 if utils.FileExists(path.Join(workPath, lastupdateFilename)) {
162 content, err := ioutil.ReadFile(path.Join(workPath, lastupdateFilename)) 165 content, err := ioutil.ReadFile(path.Join(workPath, lastupdateFilename))
163 if err != nil { 166 if err != nil {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!