go/types.Object.Pkg (method)
15 uses
go/types (current package)
object.go#L21: Pkg() *Package // package to which this object belongs; nil for labels and objects in the Universe scope
object.go#L454: if obj.Pkg() != nil && obj.Pkg().scope.Lookup(obj.Name()) == obj {
object.go#L455: writePackage(buf, obj.Pkg(), qf)
resolver.go#L465: check.errorf(alt, _DuplicateDecl, "%s already declared through dot-import of %s", alt.Name(), obj.Pkg())
golang.org/x/exp/apidiff
messageset.go#L61: tn := types.TypeString(recv.Type(), types.RelativeTo(obj.Pkg()))
golang.org/x/tools/internal/gcimporter
bexport.go#L295: p.pkg(obj.Pkg(), false)
bimport.go#L250: pkg := obj.Pkg()
iexport.go#L271: pkgObjs[obj.Pkg()] = append(pkgObjs[obj.Pkg()], pkgObj{obj, name})
iexport.go#L394: if obj.Pkg() == types.Unsafe {
iexport.go#L399: if p.shallow && obj.Pkg() != p.localpkg {
iexport.go#L439: w.setPkg(obj.Pkg(), false)
iexport.go#L907: w.typ(obj.Type(), obj.Pkg())
iimport.go#L584: obj.Pkg().Scope().Insert(obj)