[go-nuts] Re: Tools for managing licenses of dependencies

2020-04-13 Thread Charith Ellawala
GitHub's licensed tool is written in Ruby but supports Go: https://github.com/github/licensed/blob/master/docs/sources/go.md. Another option is https://github.com/frapposelli/wwhrd. Go tooling is designed with programmatic use in mind so you could also easily roll your own

[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