go/types.Object.Pkg (method)
24 uses
go/types (current package)
decl.go#L307: return packagePrefix(obj.Pkg(), check.qualifier) + obj.Name()
errsupport.go#L55: if obj.Pkg() == check.pkg {
object.go#L32: Pkg() *Package // package to which this object belongs; nil for labels and objects in the Universe scope
object.go#L564: if obj.Pkg() != nil && obj.Pkg().scope.Lookup(obj.Name()) == obj {
object.go#L565: buf.WriteString(packagePrefix(obj.Pkg(), qf))
resolver.go#L475: err.addf(alt, "%s already declared through dot-import of %s", alt.Name(), obj.Pkg())
typexpr.go#L74: if typ == nil || (gotType && wantType && obj.Pkg() == check.pkg) {
golang.org/x/exp/apidiff
messageset.go#L72: thisPackagePath := obj.Pkg().Path()
messageset.go#L93: tn := types.TypeString(recv.Type(), types.RelativeTo(obj.Pkg()))
golang.org/x/tools/go/types/objectpath
objectpath.go#L175: pkg := obj.Pkg()
objectpath.go#L792: if obj.Pkg() != pkg {
golang.org/x/tools/go/types/typeutil
ui.go#L45: if m := mset.Lookup(meth.Obj().Pkg(), meth.Obj().Name()); m != nil {
golang.org/x/tools/internal/gcimporter
iexport.go#L530: pkgObjs[obj.Pkg()] = append(pkgObjs[obj.Pkg()], pkgObj{obj, name})
iexport.go#L665: if obj.Pkg() == types.Unsafe {
iexport.go#L670: if p.shallow && obj.Pkg() != p.localpkg {
iexport.go#L1182: if obj.Pkg() == nil || obj.Pkg() == w.p.localpkg {
iexport.go#L1214: w.pkg(obj.Pkg())
iexport.go#L1286: w.typ(obj.Type(), obj.Pkg())
iimport.go#L685: obj.Pkg().Scope().Insert(obj)
golang.org/x/tools/internal/typesinternal
types.go#L140: return obj.Pkg() != nil && obj.Parent() == obj.Pkg().Scope()