Documentation ¶
Overview ¶
Package reflect provides a mockable wrapper for reflect.
Index ¶
- type Impl
- func (*Impl) Append(s reflect.Value, x ...reflect.Value) reflect.Value
- func (*Impl) AppendSlice(s reflect.Value, t reflect.Value) reflect.Value
- func (*Impl) ArrayOf(length int, elem reflect.Type) reflect.Type
- func (*Impl) ChanOf(dir reflect.ChanDir, t reflect.Type) reflect.Type
- func (*Impl) Copy(dst reflect.Value, src reflect.Value) int
- func (*Impl) DeepEqual(x any, y any) bool
- func (*Impl) FuncOf(in []reflect.Type, out []reflect.Type, variadic bool) reflect.Type
- func (*Impl) Indirect(v reflect.Value) reflect.Value
- func (*Impl) MakeChan(typ reflect.Type, buffer int) reflect.Value
- func (*Impl) MakeFunc(typ reflect.Type, fn func(args []reflect.Value) (results []reflect.Value)) reflect.Value
- func (*Impl) MakeMap(typ reflect.Type) reflect.Value
- func (*Impl) MakeMapWithSize(typ reflect.Type, n int) reflect.Value
- func (*Impl) MakeSlice(typ reflect.Type, len int, cap int) reflect.Value
- func (*Impl) MapOf(key reflect.Type, elem reflect.Type) reflect.Type
- func (*Impl) New(typ reflect.Type) reflect.Value
- func (*Impl) NewAt(typ reflect.Type, p unsafe.Pointer) reflect.Value
- func (*Impl) PointerTo(t reflect.Type) reflect.Type
- func (*Impl) PtrTo(t reflect.Type) reflect.Type
- func (*Impl) Select(cases []reflect.SelectCase) (chosen int, recv reflect.Value, recvOK bool)
- func (*Impl) SliceOf(t reflect.Type) reflect.Type
- func (*Impl) StructOf(fields []reflect.StructField) reflect.Type
- func (*Impl) Swapper(slice any) func(i int, j int)
- func (*Impl) TypeOf(i any) reflect.Type
- func (*Impl) ValueOf(i any) reflect.Value
- func (*Impl) VisibleFields(t reflect.Type) []reflect.StructField
- func (*Impl) Zero(typ reflect.Type) reflect.Value
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Impl ¶
type Impl struct{}
func (*Impl) VisibleFields ¶
func (*Impl) VisibleFields(t reflect.Type) []reflect.StructField
type Interface ¶
type Interface interface { Append(s reflect.Value, x ...reflect.Value) reflect.Value AppendSlice(s reflect.Value, t reflect.Value) reflect.Value ArrayOf(length int, elem reflect.Type) reflect.Type ChanOf(dir reflect.ChanDir, t reflect.Type) reflect.Type Copy(dst reflect.Value, src reflect.Value) int DeepEqual(x any, y any) bool FuncOf(in []reflect.Type, out []reflect.Type, variadic bool) reflect.Type Indirect(v reflect.Value) reflect.Value MakeChan(typ reflect.Type, buffer int) reflect.Value MakeFunc(typ reflect.Type, fn func(args []reflect.Value) (results []reflect.Value)) reflect.Value MakeMap(typ reflect.Type) reflect.Value MakeMapWithSize(typ reflect.Type, n int) reflect.Value MakeSlice(typ reflect.Type, len int, cap int) reflect.Value MapOf(key reflect.Type, elem reflect.Type) reflect.Type New(typ reflect.Type) reflect.Value NewAt(typ reflect.Type, p unsafe.Pointer) reflect.Value PointerTo(t reflect.Type) reflect.Type PtrTo(t reflect.Type) reflect.Type Select(cases []reflect.SelectCase) (chosen int, recv reflect.Value, recvOK bool) SliceOf(t reflect.Type) reflect.Type StructOf(fields []reflect.StructField) reflect.Type Swapper(slice any) func(i int, j int) TypeOf(i any) reflect.Type ValueOf(i any) reflect.Value VisibleFields(t reflect.Type) []reflect.StructField Zero(typ reflect.Type) reflect.Value }
Click to show internal directories.
Click to hide internal directories.