fix the repeat commentsRouters
Showing
1 changed file
with
1 additions
and
1 deletions
| ... | @@ -51,7 +51,6 @@ const COMMENTFL = "commentsRouter.go" | ... | @@ -51,7 +51,6 @@ const COMMENTFL = "commentsRouter.go" |
| 51 | 51 | ||
| 52 | func init() { | 52 | func init() { |
| 53 | pkgLastupdate = make(map[string]int64) | 53 | pkgLastupdate = make(map[string]int64) |
| 54 | genInfoList = make(map[string][]ControllerComments) | ||
| 55 | } | 54 | } |
| 56 | 55 | ||
| 57 | func parserPkg(pkgRealpath, pkgpath string) error { | 56 | func parserPkg(pkgRealpath, pkgpath string) error { |
| ... | @@ -61,6 +60,7 @@ func parserPkg(pkgRealpath, pkgpath string) error { | ... | @@ -61,6 +60,7 @@ func parserPkg(pkgRealpath, pkgpath string) error { |
| 61 | Info(pkgRealpath + " don't has updated") | 60 | Info(pkgRealpath + " don't has updated") |
| 62 | return nil | 61 | return nil |
| 63 | } | 62 | } |
| 63 | genInfoList = make(map[string][]ControllerComments) | ||
| 64 | fileSet := token.NewFileSet() | 64 | fileSet := token.NewFileSet() |
| 65 | astPkgs, err := parser.ParseDir(fileSet, pkgRealpath, func(info os.FileInfo) bool { | 65 | astPkgs, err := parser.ParseDir(fileSet, pkgRealpath, func(info os.FileInfo) bool { |
| 66 | name := info.Name() | 66 | name := info.Name() | ... | ... |
-
Please register or sign in to post a comment