Documentation
¶
Index ¶
- Variables
- func CanSet(v reflect.Value) reflect.Value
- func Field(s reflect.Value, i int) reflect.Value
- func FieldByIndex(s reflect.Value, index []int) reflect.Value
- func FieldByName(s reflect.Value, name string) reflect.Value
- func FieldByNameFunc(s reflect.Value, match func(name string) bool) reflect.Value
- func InterfaceOf(embedded []reflect.Type, methods []reflect.Method) reflect.Type
- func IsNamed(typ reflect.Type) bool
- func MakeEmptyInterface(pkgpath string, name string) reflect.Type
- func MethodByIndex(typ reflect.Type, index int) reflect.Method
- func MethodByName(typ reflect.Type, name string) (m reflect.Method, ok bool)
- func NamedInterfaceOf(pkgpath string, name string, embedded []reflect.Type, methods []reflect.Method) reflect.Type
- func NamedStructOf(pkgpath string, name string, fields []reflect.StructField) reflect.Type
- func NamedTypeOf(pkgpath string, name string, from reflect.Type) reflect.Type
- func NewInterfaceType(pkgpath string, name string) reflect.Type
- func NewMethodSet(styp reflect.Type, maxmfunc, maxpfunc int) reflect.Type
- func ReplaceType(pkg string, typ reflect.Type, m map[string]reflect.Type) (changed bool)
- func Reset()
- func SetElem(typ reflect.Type, elem reflect.Type)
- func SetInterfaceType(typ reflect.Type, embedded []reflect.Type, methods []reflect.Method) error
- func SetMethodSet(styp reflect.Type, methods []Method) error
- func SetValue(v reflect.Value, x reflect.Value)
- func StructOf(fields []reflect.StructField) reflect.Type
- func StructToMethodSet(styp reflect.Type) reflect.Type
- func TypeLinks() []reflect.Type
- func TypesByString(s string) []reflect.Type
- func UpdateField(typ reflect.Type, rmap map[reflect.Type]reflect.Type) bool
- type ChanDir
- type Method
- type Named
- type TypeKind
- type Value
Constants ¶
This section is empty.
Variables ¶
View Source
var (
EnableStructOfExportAllField bool
)
Functions ¶
func FieldByNameFunc ¶
func InterfaceOf ¶ added in v0.4.0
func MakeEmptyInterface ¶ added in v0.4.0
func MethodByName ¶ added in v0.4.0
func NamedInterfaceOf ¶ added in v0.4.0
func NamedStructOf ¶ added in v0.3.2
func NamedTypeOf ¶ added in v0.3.5
func NewInterfaceType ¶ added in v0.5.3
func NewMethodSet ¶ added in v0.5.3
NewMethodSet is pre define method set of styp maxmfunc - set methodset of T max member func maxpfunc - set methodset of *T + T max member func
func ReplaceType ¶ added in v0.5.5
func SetInterfaceType ¶ added in v0.5.3
func StructToMethodSet ¶ added in v0.5.2
StructToMethodSet extract method form struct embed fields
func TypesByString ¶ added in v0.5.14
Types ¶
type Method ¶ added in v0.5.0
type Method struct {
Name string
Pointer bool
Type reflect.Type
Func func([]reflect.Value) []reflect.Value
}
Method struct for MethodOf - name: method name - pointer: flag receiver struct or pointer - typ: method func type without receiver - fn: func with receiver as first argument
func MakeMethod ¶ added in v0.4.0
func MakeMethod(name string, pointer bool, typ reflect.Type, fn func(args []reflect.Value) (result []reflect.Value)) Method
MakeMethod make reflect.Method for MethodOf - name: method name - pointer: flag receiver struct or pointer - typ: method func type without receiver - fn: func with receiver as first argument
Click to show internal directories.
Click to hide internal directories.