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