fix the commentsRouter init sequence
Showing
1 changed file
with
2 additions
and
2 deletions
| ... | @@ -47,7 +47,7 @@ var ( | ... | @@ -47,7 +47,7 @@ var ( |
| 47 | genInfoList map[string][]ControllerComments | 47 | genInfoList map[string][]ControllerComments |
| 48 | ) | 48 | ) |
| 49 | 49 | ||
| 50 | const COMMENTFL = "commentsRouter.go" | 50 | const COMMENTFL = "commentsRouter_" |
| 51 | 51 | ||
| 52 | func init() { | 52 | func init() { |
| 53 | pkgLastupdate = make(map[string]int64) | 53 | pkgLastupdate = make(map[string]int64) |
| ... | @@ -55,7 +55,7 @@ func init() { | ... | @@ -55,7 +55,7 @@ func init() { |
| 55 | 55 | ||
| 56 | func parserPkg(pkgRealpath, pkgpath string) error { | 56 | func parserPkg(pkgRealpath, pkgpath string) error { |
| 57 | rep := strings.NewReplacer("/", "_", ".", "_") | 57 | rep := strings.NewReplacer("/", "_", ".", "_") |
| 58 | commentFilename = rep.Replace(pkgpath) + "_" + COMMENTFL | 58 | commentFilename = COMMENTFL + rep.Replace(pkgpath) + ".go" |
| 59 | if !compareFile(pkgRealpath) { | 59 | if !compareFile(pkgRealpath) { |
| 60 | Info(pkgRealpath + " don't has updated") | 60 | Info(pkgRealpath + " don't has updated") |
| 61 | return nil | 61 | return nil | ... | ... |
-
Please register or sign in to post a comment