950ff91d by astaxie

hotfix for parsefiel

1 parent b43401b9
...@@ -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
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!