2c420573 by astaxie

fix #703

1 parent c0d3cc6f
...@@ -65,11 +65,13 @@ func parserPkg(pkgRealpath, pkgpath string) error { ...@@ -65,11 +65,13 @@ func parserPkg(pkgRealpath, pkgpath string) error {
65 for _, d := range fl.Decls { 65 for _, d := range fl.Decls {
66 switch specDecl := d.(type) { 66 switch specDecl := d.(type) {
67 case *ast.FuncDecl: 67 case *ast.FuncDecl:
68 if specDecl.Recv != nil {
68 parserComments(specDecl.Doc, specDecl.Name.String(), fmt.Sprint(specDecl.Recv.List[0].Type.(*ast.StarExpr).X), pkgpath) 69 parserComments(specDecl.Doc, specDecl.Name.String(), fmt.Sprint(specDecl.Recv.List[0].Type.(*ast.StarExpr).X), pkgpath)
69 } 70 }
70 } 71 }
71 } 72 }
72 } 73 }
74 }
73 genRouterCode() 75 genRouterCode()
74 savetoFile(pkgRealpath) 76 savetoFile(pkgRealpath)
75 return nil 77 return nil
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!