Commit 07c628c7 authored by astaxie's avatar astaxie

fix the commentsRouter init sequence

parent 1e92d176
...@@ -47,7 +47,7 @@ var ( ...@@ -47,7 +47,7 @@ var (
genInfoList map[string][]ControllerComments genInfoList map[string][]ControllerComments
) )
const COMMENTFL = "commentsRouter.go" const COMMENTFL = "commentsRouter_"
func init() { func init() {
pkgLastupdate = make(map[string]int64) pkgLastupdate = make(map[string]int64)
...@@ -55,7 +55,7 @@ func init() { ...@@ -55,7 +55,7 @@ func init() {
func parserPkg(pkgRealpath, pkgpath string) error { func parserPkg(pkgRealpath, pkgpath string) error {
rep := strings.NewReplacer("/", "_", ".", "_") rep := strings.NewReplacer("/", "_", ".", "_")
commentFilename = rep.Replace(pkgpath) + "_" + COMMENTFL commentFilename = COMMENTFL + rep.Replace(pkgpath) + ".go"
if !compareFile(pkgRealpath) { if !compareFile(pkgRealpath) {
Info(pkgRealpath + " don't has updated") Info(pkgRealpath + " don't has updated")
return nil return nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment