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