fix when delete the commentsRouter.go
Showing
2 changed files
with
4 additions
and
1 deletions
| ... | @@ -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 { | ... | ... |
-
Please register or sign in to post a comment