From 1e92d17605b74555e4671a43e81fba79e5a2fae8 Mon Sep 17 00:00:00 2001 From: astaxie Date: Thu, 6 Nov 2014 16:25:47 +0800 Subject: [PATCH] fix the repeat commentsRouters --- parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser.go b/parser.go index 63655cd2..e7e324ba 100644 --- a/parser.go +++ b/parser.go @@ -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()