1e92d176 by astaxie

fix the repeat commentsRouters

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