Re: [go-nuts] Re: getting a function docs when you have a *packages.Package

2019-12-07 Thread Dan Kortschak
I completely missed the .Doc field in the ast.FuncDecl type. That's perfect. Thanks. On Sat, 2019-12-07 at 03:47 -0800, Charith Ellawala wrote: > I am searching for a good way of doing this myself. An approach that > seems > to work reasonably well is to just iterate through the AST files and >

[go-nuts] Re: getting a function docs when you have a *packages.Package

2019-12-07 Thread Charith Ellawala
I am searching for a good way of doing this myself. An approach that seems to work reasonably well is to just iterate through the AST files and extract the function declarations: cfg := &packages.Config{ Mode: packages.NeedName | packages.NeedTypes | packages.NeedSyntax | packages.NeedFiles