Documentation ¶
Index ¶
- Variables
- func ChanDirPrefix(t any) string
- func DirectedMethod(m *types.Func, t types.Type) bool
- func InspectFields(t types.Type, names *NamedBacktrace) (fields map[string][]*types.Var)
- func InspectMethods(t types.Type, names *NamedBacktrace) (methods map[string][]*types.Func)
- func InstTypeID(t types.Type, args []types.Type, wraps ...bool) string
- func Instantiate(t types.Type, args []types.Type) types.Type
- func InstantiateUnderlying(t types.Type) types.Type
- func NewPackage(path string) *types.Package
- func NewTypesType(t reflect.Type) types.Type
- func NewTypesTypeByID(wrapped string) (tt types.Type)
- func ReflectTypeID(t reflect.Type, wraps ...bool) string
- func RequirePointerRecv(m *types.Func, t types.Type) bool
- func TypesTypeID(t types.Type, wraps ...bool) string
- func UnwrapPkgPath(path string) string
- func WrapNamedTypeID(id string) string
- func WrapPkgPath(path string) string
- type CanBeInstantiated
- type Field
- type Function
- type HasElem
- type HasFields
- type HasKey
- type HasLen
- type HasLen64
- type HasMethods
- type HasObj
- type HasPkg
- type HasPkgPath
- type HasTypeArgs
- type HasTypeParams
- type Methods
- type NamedBacktrace
- type WrappedType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BasicKindsR2G = map[reflect.Kind]types.BasicKind{ reflect.Invalid: types.Invalid, reflect.Bool: types.Bool, reflect.Int: types.Int, reflect.Int8: types.Int8, reflect.Int16: types.Int16, reflect.Int32: types.Int32, reflect.Int64: types.Int64, reflect.Uint: types.Uint, reflect.Uint8: types.Uint8, reflect.Uint16: types.Uint16, reflect.Uint32: types.Uint32, reflect.Uint64: types.Uint64, reflect.Uintptr: types.Uintptr, reflect.Float32: types.Float32, reflect.Float64: types.Float64, reflect.Complex64: types.Complex64, reflect.Complex128: types.Complex128, reflect.String: types.String, reflect.UnsafePointer: types.UnsafePointer, } BasicKindsG2R = map[types.BasicKind]reflect.Kind{ types.Invalid: reflect.Invalid, types.Bool: reflect.Bool, types.UntypedBool: reflect.Bool, types.Int: reflect.Int, types.UntypedInt: reflect.Int, types.Int8: reflect.Int8, types.Int16: reflect.Int16, types.Int32: reflect.Int32, types.UntypedRune: reflect.Int32, types.Int64: reflect.Int64, types.Uint: reflect.Uint, types.Uint8: reflect.Uint8, types.Uint16: reflect.Uint16, types.Uint32: reflect.Uint32, types.Uint64: reflect.Uint64, types.Uintptr: reflect.Uintptr, types.Float32: reflect.Float32, types.UntypedFloat: reflect.Float32, types.Float64: reflect.Float64, types.Complex64: reflect.Complex64, types.UntypedComplex: reflect.Complex64, types.Complex128: reflect.Complex128, types.String: reflect.String, types.UntypedString: reflect.String, types.UnsafePointer: reflect.UnsafePointer, } )
Functions ¶
func ChanDirPrefix ¶
func InspectFields ¶
func InspectMethods ¶
func NewPackage ¶
func NewTypesTypeByID ¶
func UnwrapPkgPath ¶
func WrapNamedTypeID ¶
func WrapPkgPath ¶
Types ¶
type CanBeInstantiated ¶
type CanBeInstantiated interface { TypeParams() *types.TypeParamList TypeArgs() *types.TypeList }
type Field ¶
func FieldByNameFunc ¶
type HasPkgPath ¶
type HasPkgPath interface {
PkgPath() string
}
type HasTypeArgs ¶
type HasTypeParams ¶
type HasTypeParams interface {
TypeParams() *types.TypeParamList
}
type NamedBacktrace ¶
type NamedBacktrace struct {
// contains filtered or unexported fields
}
func (*NamedBacktrace) Len ¶
func (b *NamedBacktrace) Len() int
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) 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
Click to show internal directories.
Click to hide internal directories.