On Mon, Jan 28, 2019 at 11:53 PM Aakash das <
aakas...@gmail.com> wrote:
>
> +golang-nuts.
>
> On Tue, Jan 29, 2019 at 1:20 PM Aakash das <
aakas...@gmail.com> wrote:
>>
>> Thanks for the reply, Ian. I have an additional question. Given a Go binary package file in '.a' format, would it be possible to extract dependencies for the said binary package using some tool? My end goal is to automate the generation of the stub file for binary-only packages provided by the vendors.
I think It is possible. I think that if you run `go tool nm` on the
.a file, you will see undefined references to PKG.init. That should
give you the list of imported packages. I'm not completely sure if
every imported package will be listed reliably in that way, though.
Ian