nevermind - I think I figured it out — just need to drill down Underlying until you find types.Named and get the Obj().Pkg() from that. Only Named types have a package home..
- Randy > On Feb 16, 2019, at 12:51 AM, Randall O'Reilly <rcoreil...@gmail.com> wrote: > > I’m probably missing something very basic, but I have a go/types.Type and I > want to find which package it was defined in. I can get the path of the > Package using TypeString but somehow I can’t seem to figure out how to get > the *Package itself! I can’t find a “lookup package by path” and > LookupParent or my own attempt to crawl the Scope() hierarchy up and down > doesn’t seem to be working.. Thanks, > > - Randy > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.