fix #703
Showing
1 changed file
with
3 additions
and
1 deletions
| ... | @@ -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 | } | ... | ... |
-
Please register or sign in to post a comment