Functions
Import
function
#
Import imports a gc-generated package given its import path and srcDir, adds
the corresponding package object to the packages map, and returns the object.
The packages map must contain all packages already imported.
This function should only be used in tests.
func Import(packages map[string]*types2.Package, path string, srcDir string, lookup func(path string) (io.ReadCloser, error)) (pkg *types2.Package, err error)
ReadPackage
function
#
func ReadPackage(ctxt *types2.Context, imports map[string]*types2.Package, input pkgbits.PkgDecoder) *types2.Package
String
method
#
func (t anyType) String() string
Underlying
method
#
func (t anyType) Underlying() types2.Type
assert
function
#
func assert(p bool)
chanDir
function
#
func chanDir(d int) types2.ChanDir
doPkg
method
#
func (r *reader) doPkg() *types2.Package
doTyp
method
#
func (r *reader) doTyp() (res types2.Type)
errorf
function
#
func errorf(format string, args ...interface{})
ident
method
#
func (r *reader) ident(marker pkgbits.SyncMarker) (*types2.Package, string)
interfaceType
method
#
func (r *reader) interfaceType() *types2.Interface
localIdent
method
#
func (r *reader) localIdent() (*types2.Package, string)
method
method
#
func (r *reader) method() *types2.Func
newAliasTypeName
function
#
newAliasTypeName returns a new TypeName, with a materialized *types2.Alias if supported.
func newAliasTypeName(aliases bool, pos syntax.Pos, pkg *types2.Package, name string, rhs types2.Type, tparams []*types2.TypeParam) *types2.TypeName
newReader
method
#
func (pr *pkgReader) newReader(k pkgbits.RelocKind, idx pkgbits.Index, marker pkgbits.SyncMarker) *reader
obj
method
#
func (r *reader) obj() (types2.Object, []types2.Type)
objDictIdx
method
#
func (pr *pkgReader) objDictIdx(idx pkgbits.Index) *readerDict
objIdx
method
#
func (pr *pkgReader) objIdx(idx pkgbits.Index) (*types2.Package, string)
param
method
#
func (r *reader) param() *types2.Var
params
method
#
func (r *reader) params() *types2.Tuple
pkg
method
#
func (r *reader) pkg() *types2.Package
pkgIdx
method
#
func (pr *pkgReader) pkgIdx(idx pkgbits.Index) *types2.Package
pos
method
#
func (r *reader) pos() syntax.Pos
pos
method
#
func (s *fakeFileSet) pos(file string, line int, column int) token.Pos
posBase
method
#
func (r *reader) posBase() *syntax.PosBase
posBaseIdx
method
#
func (pr *pkgReader) posBaseIdx(idx pkgbits.Index) *syntax.PosBase
qualifiedIdent
method
#
func (r *reader) qualifiedIdent() (*types2.Package, string)
retireReader
method
#
func (pr *pkgReader) retireReader(r *reader)
selector
method
#
func (r *reader) selector() (*types2.Package, string)
signature
method
#
func (r *reader) signature(recv *types2.Var, rtparams []*types2.TypeParam, tparams []*types2.TypeParam) *types2.Signature
structType
method
#
func (r *reader) structType() *types2.Struct
tempReader
method
#
func (pr *pkgReader) tempReader(k pkgbits.RelocKind, idx pkgbits.Index, marker pkgbits.SyncMarker) *reader
typ
method
#
func (r *reader) typ() types2.Type
typIdx
method
#
func (pr *pkgReader) typIdx(info typeInfo, dict *readerDict) types2.Type
typInfo
method
#
func (r *reader) typInfo() typeInfo
typeParamNames
method
#
func (r *reader) typeParamNames() []*types2.TypeParam
unionType
method
#
func (r *reader) unionType() *types2.Union