2c420573 by astaxie

fix #703

1 parent c0d3cc6f
...@@ -65,7 +65,9 @@ func parserPkg(pkgRealpath, pkgpath string) error { ...@@ -65,7 +65,9 @@ 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 parserComments(specDecl.Doc, specDecl.Name.String(), fmt.Sprint(specDecl.Recv.List[0].Type.(*ast.StarExpr).X), pkgpath) 68 if specDecl.Recv != nil {
69 parserComments(specDecl.Doc, specDecl.Name.String(), fmt.Sprint(specDecl.Recv.List[0].Type.(*ast.StarExpr).X), pkgpath)
70 }
69 } 71 }
70 } 72 }
71 } 73 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!