internal

package
v0.0.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func ChanDirPrefix

func ChanDirPrefix(t any) string

func DirectedMethod

func DirectedMethod(m *types.Func, t types.Type) bool

func InspectFields

func InspectFields(t types.Type, names *NamedBacktrace) (fields map[string][]*types.Var)

func InspectMethods

func InspectMethods(t types.Type, names *NamedBacktrace) (methods map[string][]*types.Func)

func InstTypeID

func InstTypeID(t types.Type, args []types.Type, wraps ...bool) string

func Instantiate

func Instantiate(t types.Type, args []types.Type) types.Type

func InstantiateUnderlying

func InstantiateUnderlying(t types.Type) types.Type

func NewPackage

func NewPackage(path string) *types.Package

func NewTypesType

func NewTypesType(t reflect.Type) types.Type

func NewTypesTypeByID

func NewTypesTypeByID(wrapped string) (tt types.Type)

func ReflectTypeID

func ReflectTypeID(t reflect.Type, wraps ...bool) string

func RequirePointerRecv

func RequirePointerRecv(m *types.Func, t types.Type) bool

func TypesTypeID

func TypesTypeID(t types.Type, wraps ...bool) string

func UnwrapPkgPath

func UnwrapPkgPath(path string) string

func WrapNamedTypeID

func WrapNamedTypeID(id string) string

func WrapPkgPath

func WrapPkgPath(path string) string

Types

type CanBeInstantiated

type CanBeInstantiated interface {
	TypeParams() *types.TypeParamList
	TypeArgs() *types.TypeList
}

type Field

type Field struct {
	*types.Var
	Tag string
}

func FieldByName

func FieldByName(t types.Type, match func(string) bool) *Field

func FieldByNameFunc

func FieldByNameFunc(t types.Type, match func(string) bool, names *NamedBacktrace, entries int) *Field

type Function

type Function interface {
	Params() *types.Tuple
	Results() *types.Tuple
	Variadic() bool
	Recv() *types.Var
}

type HasElem

type HasElem interface {
	Elem() types.Type
}

type HasFields

type HasFields interface {
	NumFields() int
	Field(int) *types.Var
	Tag(int) string
}

type HasKey

type HasKey interface {
	Key() types.Type
}

type HasLen

type HasLen interface {
	Len() int
}

type HasLen64

type HasLen64 interface {
	Len() int64
}

type HasMethods

type HasMethods interface {
	NumMethods() int
	Method(int) *types.Func
}

type HasObj

type HasObj interface {
	Obj() *types.TypeName
}

type HasPkg

type HasPkg interface {
	Pkg() *types.Package
}

type HasPkgPath

type HasPkgPath interface {
	PkgPath() string
}

type HasTypeArgs

type HasTypeArgs interface {
	TypeArgs() *types.TypeList
}

type HasTypeParams

type HasTypeParams interface {
	TypeParams() *types.TypeParamList
}

type Methods

type Methods struct {
	// contains filtered or unexported fields
}

func ScanMethods

func ScanMethods(t types.Type) *Methods

func (*Methods) Method

func (m *Methods) Method(i int) *types.Func

func (*Methods) MethodByName

func (m *Methods) MethodByName(name string) *types.Func

func (*Methods) NumMethod

func (m *Methods) NumMethod() int

type NamedBacktrace

type NamedBacktrace struct {
	// contains filtered or unexported fields
}

func (*NamedBacktrace) Len

func (b *NamedBacktrace) Len() int

func (*NamedBacktrace) Push

func (b *NamedBacktrace) Push(v *types.Named) bool

func (*NamedBacktrace) Top

func (b *NamedBacktrace) Top() *types.Named

type WrappedType

type WrappedType struct {
	// contains filtered or unexported fields
}

func NewWrappedType

func NewWrappedType(wrapped string) *WrappedType

func (*WrappedType) Fields

func (t *WrappedType) Fields() ([]*types.Var, []string)

func (*WrappedType) Methods

func (t *WrappedType) Methods() []*types.Func

func (*WrappedType) Params

func (t *WrappedType) Params() *types.Tuple

func (*WrappedType) Results

func (t *WrappedType) Results() *types.Tuple

func (*WrappedType) String

func (t *WrappedType) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL