Documentation ¶
Index ¶
- func CodeOf(v interface{}) uintptr
- func IsNil(v interface{}) bool
- func MakeAddressable(value reflect.Value) reflect.Value
- func ParseStructTag(tag reflect.StructTag, findFn func(name, qvalue string) bool) (string, string, bool)
- type FieldGetterFunc
- type IfaceToReceiverFactoryFunc
- type IfaceToReceiverFunc
- type TypedReceiver
- type ValueToReceiverFactoryFunc
- type ValueToReceiverFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CodeOf ¶
func CodeOf(v interface{}) uintptr
A faster version (25-35%) to get comparable identity of function's code. Same to reflect.ValueOf(<func>).Pointer(), but doesn't force heap-escape of the argument. NB! ONLY works for hard-coded functions. Functions created with reflect will have same code identity.
Types ¶
type FieldGetterFunc ¶
func FieldValueGetter ¶
func FieldValueGetter(index int, fd reflect.StructField, useAddr bool, baseOffset uintptr) FieldGetterFunc
type IfaceToReceiverFactoryFunc ¶
type IfaceToReceiverFactoryFunc func(t reflect.Type, checkZero bool) IfaceToReceiverFunc
type IfaceToReceiverFunc ¶
type IfaceToReceiverFunc func(value interface{}, k reflect.Kind, out TypedReceiver)
type TypedReceiver ¶
type TypedReceiver interface { ReceiveBool(reflect.Kind, bool) ReceiveInt(reflect.Kind, int64) ReceiveUint(reflect.Kind, uint64) ReceiveFloat(reflect.Kind, float64) ReceiveComplex(reflect.Kind, complex128) ReceiveString(reflect.Kind, string) ReceiveZero(reflect.Kind) ReceiveNil(reflect.Kind) ReceiveIface(reflect.Kind, interface{}) ReceiveElse(t reflect.Kind, v interface{}, isZero bool) }
type ValueToReceiverFactoryFunc ¶
type ValueToReceiverFactoryFunc func(unexported bool, t reflect.Type, checkZero bool) (bool, ValueToReceiverFunc)
func ValueToReceiverFactory ¶
func ValueToReceiverFactory(k reflect.Kind, custom IfaceToReceiverFactoryFunc) ValueToReceiverFactoryFunc
type ValueToReceiverFunc ¶
type ValueToReceiverFunc func(value reflect.Value, out TypedReceiver)
Click to show internal directories.
Click to hide internal directories.