1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-23 00:30:48 +00:00

fix the repeat commentsRouters

This commit is contained in:
astaxie 2014-11-06 16:25:47 +08:00
parent bb795847da
commit 1e92d17605

View File

@ -51,7 +51,6 @@ const COMMENTFL = "commentsRouter.go"
func init() {
pkgLastupdate = make(map[string]int64)
genInfoList = make(map[string][]ControllerComments)
}
func parserPkg(pkgRealpath, pkgpath string) error {
@ -61,6 +60,7 @@ func parserPkg(pkgRealpath, pkgpath string) error {
Info(pkgRealpath + " don't has updated")
return nil
}
genInfoList = make(map[string][]ControllerComments)
fileSet := token.NewFileSet()
astPkgs, err := parser.ParseDir(fileSet, pkgRealpath, func(info os.FileInfo) bool {
name := info.Name()