type reflect.Value

399 uses

	reflect (current package)
		badlinkname.go#L130: func badlinkname_Value_pointer(Value) unsafe.Pointer
		deepequal.go#L27: func deepValueEqual(v1, v2 Value, visited map[visit]bool) bool {
		deepequal.go#L39: 	hard := func(v1, v2 Value) bool {
		deepequal.go#L63: 		ptrval := func(v Value) unsafe.Pointer {
		iter.go#L13: 	uintptr, N int64 | uint64](num N, t Type) iter.Seq[Value] {
		iter.go#L14: 	return func(yield func(v Value) bool) {
		iter.go#L38: func (v Value) Seq() iter.Seq[Value] {
		iter.go#L40: 		return func(yield func(Value) bool) {
		iter.go#L41: 			rf := MakeFunc(v.Type().In(0), func(in []Value) []Value {
		iter.go#L42: 				return []Value{ValueOf(yield(in[0]))}
		iter.go#L44: 			v.Call([]Value{rf})
		iter.go#L74: 		return func(yield func(Value) bool) {
		iter.go#L83: 		return func(yield func(Value) bool) {
		iter.go#L91: 		return func(yield func(Value) bool) {
		iter.go#L99: 		return func(yield func(Value) bool) {
		iter.go#L108: 		return func(yield func(Value) bool) {
		iter.go#L124: func (v Value) Seq2() iter.Seq2[Value, Value] {
		iter.go#L126: 		return func(yield func(Value, Value) bool) {
		iter.go#L127: 			rf := MakeFunc(v.Type().In(0), func(in []Value) []Value {
		iter.go#L128: 				return []Value{ValueOf(yield(in[0], in[1]))}
		iter.go#L130: 			v.Call([]Value{rf})
		iter.go#L138: 		return func(yield func(Value, Value) bool) {
		iter.go#L147: 		return func(yield func(Value, Value) bool) {
		iter.go#L155: 		return func(yield func(Value, Value) bool) {
		iter.go#L163: 		return func(yield func(Value, Value) bool) {
		makefunc.go#L23: 	fn   func([]Value) []Value
		makefunc.go#L47: func MakeFunc(typ Type, fn func(args []Value) (results []Value)) Value {
		makefunc.go#L71: 	return Value{t, unsafe.Pointer(impl), flag(Func)}
		makefunc.go#L87: 	rcvr   Value
		makefunc.go#L97: func makeMethodValue(op string, v Value) Value {
		makefunc.go#L105: 	rcvr := Value{v.typ(), v.ptr, fl}
		makefunc.go#L130: 	return Value{ftyp.Common(), unsafe.Pointer(fv), v.flag&flagRO | flag(Func)}
		map.go#L139: func (v Value) MapIndex(key Value) Value {
		map.go#L166: 		return Value{}
		map.go#L203: func (v Value) MapKeys() []Value {
		map.go#L221: 	a := make([]Value, mlen)
		map.go#L240: 	m     Value
		map.go#L245: func (iter *MapIter) Key() Value {
		map.go#L264: func (v Value) SetIterKey(iter *MapIter) {
		map.go#L283: 	key := Value{ktype, iterkey, iter.m.flag | flag(ktype.Kind()) | flagIndir}
		map.go#L289: func (iter *MapIter) Value() Value {
		map.go#L308: func (v Value) SetIterValue(iter *MapIter) {
		map.go#L327: 	elem := Value{vtype, iterelem, iter.m.flag | flag(vtype.Kind()) | flagIndir}
		map.go#L356: func (iter *MapIter) Reset(v Value) {
		map.go#L379: func (v Value) MapRange() *MapIter {
		map.go#L396: func (v Value) SetMapIndex(key, elem Value) {
		type.go#L482: 	Func  Value // func with receiver as first argument
		type.go#L672: 	m.Func = Value{&mt.(*rtype).t, fn, fl}
		value.go#L40: type Value struct {
		value.go#L100: func (v Value) typ() *abi.Type {
		value.go#L112: func (v Value) pointer() unsafe.Pointer {
		value.go#L123: func packEface(v Value) any {
		value.go#L132: func packEfaceData(v Value) unsafe.Pointer {
		value.go#L158: func unpackEface(i any) Value {
		value.go#L162: 		return Value{}
		value.go#L168: 	return Value{t, e.Data, f}
		value.go#L269: func (v Value) Addr() Value {
		value.go#L276: 	return Value{ptrTo(v.typ()), v.ptr, fl | flag(Pointer)}
		value.go#L281: func (v Value) Bool() bool {
		value.go#L289: func (v Value) panicNotBool() {
		value.go#L298: func (v Value) Bytes() []byte {
		value.go#L306: func (v Value) bytesSlow() []byte {
		value.go#L330: func (v Value) runes() []rune {
		value.go#L344: func (v Value) CanAddr() bool {
		value.go#L353: func (v Value) CanSet() bool {
		value.go#L366: func (v Value) Call(in []Value) []Value {
		value.go#L380: func (v Value) CallSlice(in []Value) []Value {
		value.go#L390: func (v Value) call(op string, in []Value) []Value {
		value.go#L395: 		rcvr     Value
		value.go#L458: 		in = make([]Value, n+1)
		value.go#L593: 	var ret []Value
		value.go#L608: 		ret = make([]Value, nout)
		value.go#L623: 				ret[i] = Value{tv, add(stackArgs, st.stkOff, "tv.Size() != 0"), fl}
		value.go#L639: 				ret[i] = Value{tv, regArgs.Ptrs[steps[0].ireg], flag(tv.Kind())}
		value.go#L670: 			ret[i] = Value{tv, s, flagIndir | flag(tv.Kind())}
		value.go#L713: 	in := make([]Value, 0, int(ftyp.InCount))
		value.go#L719: 		v := Value{typ, nil, flag(typ.Kind())}
		value.go#L877: func methodReceiver(op string, v Value, methodIndex int) (rcvrtype *abi.Type, t *funcType, fn unsafe.Pointer) {
		value.go#L916: func storeRcvr(v Value, p unsafe.Pointer) {
		value.go#L1144: func funcName(f func([]Value) []Value) string {
		value.go#L1155: func (v Value) Cap() int {
		value.go#L1163: func (v Value) capNonSlice() int {
		value.go#L1182: func (v Value) Close() {
		value.go#L1194: func (v Value) CanComplex() bool {
		value.go#L1205: func (v Value) Complex() complex128 {
		value.go#L1220: func (v Value) Elem() Value {
		value.go#L1251: 			return Value{}
		value.go#L1257: 		return Value{typ, ptr, fl}
		value.go#L1264: func (v Value) Field(i int) Value {
		value.go#L1293: 		return Value{typ, nil, fl | flagIndir}
		value.go#L1302: 	return Value{typ, ptr, fl}
		value.go#L1308: func (v Value) FieldByIndex(index []int) Value {
		value.go#L1331: func (v Value) FieldByIndexErr(index []int) (Value, error) {
		value.go#L1340: 					return Value{}, errors.New("reflect: indirection through nil pointer to embedded struct field " + nameFor(v.typ().Elem()))
		value.go#L1353: func (v Value) FieldByName(name string) Value {
		value.go#L1358: 	return Value{}
		value.go#L1365: func (v Value) FieldByNameFunc(match func(string) bool) Value {
		value.go#L1369: 	return Value{}
		value.go#L1373: func (v Value) CanFloat() bool {
		value.go#L1384: func (v Value) Float() float64 {
		value.go#L1399: func (v Value) Index(i int) Value {
		value.go#L1416: 		return Value{typ, val, fl}
		value.go#L1429: 		return Value{typ, val, fl}
		value.go#L1438: 		return Value{uint8Type, p, fl}
		value.go#L1444: func (v Value) CanInt() bool {
		value.go#L1455: func (v Value) Int() int64 {
		value.go#L1474: func (v Value) CanInterface() bool {
		value.go#L1488: func (v Value) Interface() (i any) {
		value.go#L1492: func valueInterface(v Value, safe bool) any {
		value.go#L1517: func TypeAssert[T any](v Value) (T, bool) {
		value.go#L1592: func packIfaceValueIntoEmptyIface(v Value) any {
		value.go#L1612: func (v Value) InterfaceData() [2]uintptr {
		value.go#L1631: func (v Value) IsNil() bool {
		value.go#L1656: func (v Value) IsValid() bool {
		value.go#L1662: func (v Value) IsZero() bool {
		value.go#L1789: func (v Value) SetZero() {
		value.go#L1843: func (v Value) Kind() Kind {
		value.go#L1849: func (v Value) Len() int {
		value.go#L1857: func (v Value) lenNonSlice() int {
		value.go#L1880: func copyVal(typ *abi.Type, fl flag, ptr unsafe.Pointer) Value {
		value.go#L1886: 		return Value{typ, c, fl | flagIndir}
		value.go#L1888: 	return Value{typ, *(*unsafe.Pointer)(ptr), fl}
		value.go#L1898: func (v Value) Method(i int) Value {
		value.go#L1911: 	return Value{v.typ(), v.ptr, fl}
		value.go#L1919: func (v Value) NumMethod() int {
		value.go#L1938: func (v Value) MethodByName(name string) Value {
		value.go#L1943: 		return Value{}
		value.go#L1947: 		return Value{}
		value.go#L1954: func (v Value) NumField() int {
		value.go#L1962: func (v Value) OverflowComplex(x complex128) bool {
		value.go#L1975: func (v Value) OverflowFloat(x float64) bool {
		value.go#L1995: func (v Value) OverflowInt(x int64) bool {
		value.go#L2008: func (v Value) OverflowUint(x uint64) bool {
		value.go#L2040: func (v Value) Pointer() uintptr {
		value.go#L2089: func (v Value) Recv() (x Value, ok bool) {
		value.go#L2097: func (v Value) recv(nb bool) (val Value, ok bool) {
		value.go#L2103: 	val = Value{t, nil, flag(t.Kind())}
		value.go#L2114: 		val = Value{}
		value.go#L2122: func (v Value) Send(x Value) {
		value.go#L2130: func (v Value) send(x Value, nb bool) (selected bool) {
		value.go#L2150: func (v Value) Set(x Value) {
		value.go#L2171: func (v Value) SetBool(x bool) {
		value.go#L2180: func (v Value) SetBytes(x []byte) {
		value.go#L2192: func (v Value) setRunes(x []rune) {
		value.go#L2204: func (v Value) SetComplex(x complex128) {
		value.go#L2219: func (v Value) SetFloat(x float64) {
		value.go#L2234: func (v Value) SetInt(x int64) {
		value.go#L2256: func (v Value) SetLen(n int) {
		value.go#L2270: func (v Value) SetCap(n int) {
		value.go#L2283: func (v Value) SetUint(x uint64) {
		value.go#L2306: func (v Value) SetPointer(x unsafe.Pointer) {
		value.go#L2314: func (v Value) SetString(x string) {
		value.go#L2323: func (v Value) Slice(i, j int) Value {
		value.go#L2357: 		return Value{v.typ(), unsafe.Pointer(&t), v.flag}
		value.go#L2379: 	return Value{typ.Common(), unsafe.Pointer(&x), fl}
		value.go#L2385: func (v Value) Slice3(i, j, k int) Value {
		value.go#L2431: 	return Value{typ.Common(), unsafe.Pointer(&x), fl}
		value.go#L2440: func (v Value) String() string {
		value.go#L2448: func (v Value) stringNonString() string {
		value.go#L2462: func (v Value) TryRecv() (x Value, ok bool) {
		value.go#L2472: func (v Value) TrySend(x Value) bool {
		value.go#L2479: func (v Value) Type() Type {
		value.go#L2487: func (v Value) typeSlow() Type {
		value.go#L2491: func (v Value) abiType() *abi.Type {
		value.go#L2498: func (v Value) abiTypeSlow() *abi.Type {
		value.go#L2530: func (v Value) CanUint() bool {
		value.go#L2541: func (v Value) Uint() uint64 {
		value.go#L2570: func (v Value) UnsafeAddr() uintptr {
		value.go#L2596: func (v Value) UnsafePointer() unsafe.Pointer {
		value.go#L2643: func (v Value) Fields() iter.Seq2[StructField, Value] {
		value.go#L2648: 	return func(yield func(StructField, Value) bool) {
		value.go#L2668: func (v Value) Methods() iter.Seq2[Method, Value] {
		value.go#L2669: 	return func(yield func(Method, Value) bool) {
		value.go#L2729: func (v Value) Grow(n int) {
		value.go#L2736: func (v Value) grow(n int) {
		value.go#L2755: func (v Value) extendSlice(n int) Value {
		value.go#L2773: func (v Value) Clear() {
		value.go#L2788: func Append(s Value, x ...Value) Value {
		value.go#L2800: func AppendSlice(s, t Value) Value {
		value.go#L2819: func Copy(dst, src Value) int {
		value.go#L2921: 	Chan Value     // channel to use (for send or receive)
		value.go#L2922: 	Send Value     // value to send (for send)
		value.go#L2933: func Select(cases []SelectCase) (chosen int, recv Value, recvOK bool) {
		value.go#L3024: 			recv = Value{t, p, fl | flagIndir}
		value.go#L3026: 			recv = Value{t, *(*unsafe.Pointer)(p), fl}
		value.go#L3046: func MakeSlice(typ Type, len, cap int) Value {
		value.go#L3061: 	return Value{&typ.(*rtype).t, unsafe.Pointer(&s), flagIndir | flag(Slice)}
		value.go#L3068: func SliceAt(typ Type, p unsafe.Pointer, n int) Value {
		value.go#L3071: 	return Value{SliceOf(typ).common(), unsafe.Pointer(&s), flagIndir | flag(Slice)}
		value.go#L3075: func MakeChan(typ Type, buffer int) Value {
		value.go#L3087: 	return Value{t, ch, flag(Chan)}
		value.go#L3091: func MakeMap(typ Type) Value {
		value.go#L3097: func MakeMapWithSize(typ Type, n int) Value {
		value.go#L3103: 	return Value{t, m, flag(Map)}
		value.go#L3109: func Indirect(v Value) Value {
		value.go#L3118: func ValueOf(i any) Value {
		value.go#L3120: 		return Value{}
		value.go#L3130: func Zero(typ Type) Value {
		value.go#L3143: 		return Value{t, p, fl | flagIndir}
		value.go#L3145: 	return Value{t, nil, fl}
		value.go#L3153: func New(typ Type) Value {
		value.go#L3165: 	return Value{pt, ptr, fl}
		value.go#L3170: func NewAt(typ Type, p unsafe.Pointer) Value {
		value.go#L3173: 	return Value{t.ptrTo(), p, fl}
		value.go#L3181: func (v Value) assignTo(context string, dst *abi.Type, target unsafe.Pointer) Value {
		value.go#L3192: 		return Value{dst, v.ptr, fl}
		value.go#L3199: 			return Value{dst, nil, flag(Interface)}
		value.go#L3210: 		return Value{dst, target, flagIndir | flag(Interface)}
		value.go#L3220: func (v Value) Convert(t Type) Value {
		value.go#L3233: func (v Value) CanConvert(t Type) bool {
		value.go#L3258: func (v Value) Comparable() bool {
		value.go#L3300: func (v Value) Equal(u Value) bool {
		value.go#L3368: func convertOp(dst, src *abi.Type) func(Value, Type) Value {
		value.go#L3466: func makeInt(f flag, bits uint64, t Type) Value {
		value.go#L3479: 	return Value{typ, ptr, f | flagIndir | flag(typ.Kind())}
		value.go#L3484: func makeFloat(f flag, v float64, t Type) Value {
		value.go#L3493: 	return Value{typ, ptr, f | flagIndir | flag(typ.Kind())}
		value.go#L3497: func makeFloat32(f flag, v float32, t Type) Value {
		value.go#L3501: 	return Value{typ, ptr, f | flagIndir | flag(typ.Kind())}
		value.go#L3506: func makeComplex(f flag, v complex128, t Type) Value {
		value.go#L3515: 	return Value{typ, ptr, f | flagIndir | flag(typ.Kind())}
		value.go#L3518: func makeString(f flag, v string, t Type) Value {
		value.go#L3525: func makeBytes(f flag, v []byte, t Type) Value {
		value.go#L3532: func makeRunes(f flag, v []rune, t Type) Value {
		value.go#L3545: func cvtInt(v Value, t Type) Value {
		value.go#L3550: func cvtUint(v Value, t Type) Value {
		value.go#L3555: func cvtFloatInt(v Value, t Type) Value {
		value.go#L3560: func cvtFloatUint(v Value, t Type) Value {
		value.go#L3565: func cvtIntFloat(v Value, t Type) Value {
		value.go#L3570: func cvtUintFloat(v Value, t Type) Value {
		value.go#L3575: func cvtFloat(v Value, t Type) Value {
		value.go#L3586: func cvtComplex(v Value, t Type) Value {
		value.go#L3591: func cvtIntString(v Value, t Type) Value {
		value.go#L3600: func cvtUintString(v Value, t Type) Value {
		value.go#L3609: func cvtBytesString(v Value, t Type) Value {
		value.go#L3614: func cvtStringBytes(v Value, t Type) Value {
		value.go#L3619: func cvtRunesString(v Value, t Type) Value {
		value.go#L3624: func cvtStringRunes(v Value, t Type) Value {
		value.go#L3629: func cvtSliceArrayPtr(v Value, t Type) Value {
		value.go#L3635: 	return Value{t.common(), h.Data, v.flag&^(flagIndir|flagAddr|flagKindMask) | flag(Pointer)}
		value.go#L3639: func cvtSliceArray(v Value, t Type) Value {
		value.go#L3651: 	return Value{typ, ptr, v.flag&^(flagAddr|flagKindMask) | flag(Array)}
		value.go#L3655: func cvtDirect(v Value, typ Type) Value {
		value.go#L3666: 	return Value{t, ptr, v.flag.ro() | f} // v.flag.ro()|f == f?
		value.go#L3670: func cvtT2I(v Value, typ Type) Value {
		value.go#L3678: 	return Value{typ.common(), target, v.flag.ro() | flagIndir | flag(Interface)}
		value.go#L3682: func cvtI2I(v Value, typ Type) Value {

	encoding/asn1
		asn1.go#L632: func parseSequenceOf(bytes []byte, sliceType reflect.Type, elemType reflect.Type) (ret reflect.Value, err error) {
		asn1.go#L709: func parseField(v reflect.Value, bytes []byte, initOffset int, params fieldParameters) (offset int, err error) {
		asn1.go#L1050: func setDefaultValue(v reflect.Value, params fieldParameters) (ok bool) {
		marshal.go#L458: func makeBody(value reflect.Value, params fieldParameters) (e encoder, err error) {
		marshal.go#L579: func makeField(v reflect.Value, params fieldParameters) (e encoder, err error) {

	encoding/binary
		binary.go#L698: func dataSize(v reflect.Value) int {
		binary.go#L845: func (d *decoder) value(v reflect.Value) {
		binary.go#L914: func (e *encoder) value(v reflect.Value) {
		binary.go#L977: func (d *decoder) skip(v reflect.Value) {
		binary.go#L981: func (e *encoder) skip(v reflect.Value) {

	encoding/json
		decode.go#L363: func (d *decodeState) value(v reflect.Value) error {
		decode.go#L432: func indirect(v reflect.Value, decodingNull bool) (Unmarshaler, encoding.TextUnmarshaler, reflect.Value) {
		decode.go#L486: 				return u, nil, reflect.Value{}
		decode.go#L490: 					return nil, u, reflect.Value{}
		decode.go#L507: func (d *decodeState) array(v reflect.Value) error {
		decode.go#L566: 			if err := d.value(reflect.Value{}); err != nil {
		decode.go#L604: func (d *decodeState) object(v reflect.Value) error {
		decode.go#L660: 	var mapElem reflect.Value
		decode.go#L687: 		var subv reflect.Value
		decode.go#L721: 								subv = reflect.Value{}
		decode.go#L776: 			var kv reflect.Value
		decode.go#L856: func (d *decodeState) literalStore(item []byte, v reflect.Value, fromQuoted bool) error {
		encode.go#L253: 	Value reflect.Value
		encode.go#L352: func isEmptyValue(v reflect.Value) bool {
		encode.go#L366: func (e *encodeState) reflectValue(v reflect.Value, opts encOpts) {
		encode.go#L377: type encoderFunc func(e *encodeState, v reflect.Value, opts encOpts)
		encode.go#L381: func valueEncoder(v reflect.Value) encoderFunc {
		encode.go#L402: 	fi, loaded := encoderCache.LoadOrStore(t, encoderFunc(func(e *encodeState, v reflect.Value, opts encOpts) {
		encode.go#L469: func invalidValueEncoder(e *encodeState, v reflect.Value, _ encOpts) {
		encode.go#L473: func marshalerEncoder(e *encodeState, v reflect.Value, opts encOpts) {
		encode.go#L495: func addrMarshalerEncoder(e *encodeState, v reflect.Value, opts encOpts) {
		encode.go#L514: func textMarshalerEncoder(e *encodeState, v reflect.Value, opts encOpts) {
		encode.go#L531: func addrTextMarshalerEncoder(e *encodeState, v reflect.Value, opts encOpts) {
		encode.go#L545: func boolEncoder(e *encodeState, v reflect.Value, opts encOpts) {
		encode.go#L553: func intEncoder(e *encodeState, v reflect.Value, opts encOpts) {
		encode.go#L561: func uintEncoder(e *encodeState, v reflect.Value, opts encOpts) {
		encode.go#L571: func (bits floatEncoder) encode(e *encodeState, v reflect.Value, opts encOpts) {
		encode.go#L610: func stringEncoder(e *encodeState, v reflect.Value, opts encOpts) {
		encode.go#L695: func interfaceEncoder(e *encodeState, v reflect.Value, opts encOpts) {
		encode.go#L703: func unsupportedTypeEncoder(e *encodeState, v reflect.Value, _ encOpts) {
		encode.go#L717: func (se structEncoder) encode(e *encodeState, v reflect.Value, opts encOpts) {
		encode.go#L765: func (me mapEncoder) encode(e *encodeState, v reflect.Value, opts encOpts) {
		encode.go#L824: func encodeByteSlice(e *encodeState, v reflect.Value, _ encOpts) {
		encode.go#L843: func (se sliceEncoder) encode(e *encodeState, v reflect.Value, opts encOpts) {
		encode.go#L883: func (ae arrayEncoder) encode(e *encodeState, v reflect.Value, opts encOpts) {
		encode.go#L904: func (pe ptrEncoder) encode(e *encodeState, v reflect.Value, opts encOpts) {
		encode.go#L932: func (ce condAddrEncoder) encode(e *encodeState, v reflect.Value, opts encOpts) {
		encode.go#L975: 	v  reflect.Value
		encode.go#L979: func resolveKeyName(k reflect.Value) (string, error) {
		encode.go#L1081: 	isZero    func(reflect.Value) bool
		encode.go#L1196: 							field.isZero = func(v reflect.Value) bool {
		encode.go#L1204: 							field.isZero = func(v reflect.Value) bool {
		encode.go#L1209: 							field.isZero = func(v reflect.Value) bool {
		encode.go#L1213: 							field.isZero = func(v reflect.Value) bool {

	fmt
		print.go#L127: 	value reflect.Value
		print.go#L179: 	p.value = reflect.Value{}
		print.go#L342: func getField(v reflect.Value, i int) reflect.Value {
		print.go#L372: func (p *pp) unknownType(v reflect.Value) {
		print.go#L550: func (p *pp) fmtPointer(value reflect.Value, verb rune) {
		print.go#L684: 	p.value = reflect.Value{}
		print.go#L745: 	case reflect.Value:
		print.go#L767: func (p *pp) printValue(value reflect.Value, verb rune, depth int) {

	github.com/gotd/td/tdp
		tdp.go#L32: func formatValue(b *strings.Builder, prefix, fieldName string, opt options, v reflect.Value) {

	go.opentelemetry.io/otel/attribute
		set.go#L97: func (l Set) reflectValue() reflect.Value {
		value.go#L655: func appendBoolSliceReflect(dst *strings.Builder, rv reflect.Value) {
		value.go#L729: func appendInt64SliceReflect(dst *strings.Builder, rv reflect.Value) {
		value.go#L826: func appendFloat64SliceReflect(dst *strings.Builder, rv reflect.Value) {
		value.go#L911: func appendStringSliceReflect(dst *strings.Builder, rv reflect.Value) {
		value.go#L1028: func appendValueSliceReflect(dst *strings.Builder, rv reflect.Value) {
		value.go#L1081: func appendMapReflect(dst *strings.Builder, rv reflect.Value) {

	internal/fmtsort
		sort.go#L28: 	Key, Value reflect.Value
		sort.go#L49: func Sort(mapValue reflect.Value) SortedMap {
		sort.go#L72: func compare(aVal, bVal reflect.Value) int {
		sort.go#L143: func nilCompare(aVal, bVal reflect.Value) (int, bool) {

	net/http/httptrace
		trace.go#L202: 		newFunc := reflect.MakeFunc(hookType, func(args []reflect.Value) []reflect.Value {