type reflect.Value
398 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#L1294: return Value{typ, unsafe.Pointer(&zeroVal[0]), fl | flagIndir}
value.go#L1303: return Value{typ, ptr, fl}
value.go#L1309: func (v Value) FieldByIndex(index []int) Value {
value.go#L1332: func (v Value) FieldByIndexErr(index []int) (Value, error) {
value.go#L1341: return Value{}, errors.New("reflect: indirection through nil pointer to embedded struct field " + nameFor(v.typ().Elem()))
value.go#L1354: func (v Value) FieldByName(name string) Value {
value.go#L1359: return Value{}
value.go#L1366: func (v Value) FieldByNameFunc(match func(string) bool) Value {
value.go#L1370: return Value{}
value.go#L1374: func (v Value) CanFloat() bool {
value.go#L1385: func (v Value) Float() float64 {
value.go#L1400: func (v Value) Index(i int) Value {
value.go#L1417: return Value{typ, val, fl}
value.go#L1430: return Value{typ, val, fl}
value.go#L1439: return Value{uint8Type, p, fl}
value.go#L1445: func (v Value) CanInt() bool {
value.go#L1456: func (v Value) Int() int64 {
value.go#L1475: func (v Value) CanInterface() bool {
value.go#L1489: func (v Value) Interface() (i any) {
value.go#L1493: func valueInterface(v Value, safe bool) any {
value.go#L1518: func TypeAssert[T any](v Value) (T, bool) {
value.go#L1593: func packIfaceValueIntoEmptyIface(v Value) any {
value.go#L1613: func (v Value) InterfaceData() [2]uintptr {
value.go#L1632: func (v Value) IsNil() bool {
value.go#L1657: func (v Value) IsValid() bool {
value.go#L1663: func (v Value) IsZero() bool {
value.go#L1790: func (v Value) SetZero() {
value.go#L1844: func (v Value) Kind() Kind {
value.go#L1850: func (v Value) Len() int {
value.go#L1858: func (v Value) lenNonSlice() int {
value.go#L1881: func copyVal(typ *abi.Type, fl flag, ptr unsafe.Pointer) Value {
value.go#L1887: return Value{typ, c, fl | flagIndir}
value.go#L1889: return Value{typ, *(*unsafe.Pointer)(ptr), fl}
value.go#L1899: func (v Value) Method(i int) Value {
value.go#L1912: return Value{v.typ(), v.ptr, fl}
value.go#L1920: func (v Value) NumMethod() int {
value.go#L1939: func (v Value) MethodByName(name string) Value {
value.go#L1944: return Value{}
value.go#L1948: return Value{}
value.go#L1955: func (v Value) NumField() int {
value.go#L1963: func (v Value) OverflowComplex(x complex128) bool {
value.go#L1976: func (v Value) OverflowFloat(x float64) bool {
value.go#L1996: func (v Value) OverflowInt(x int64) bool {
value.go#L2009: func (v Value) OverflowUint(x uint64) bool {
value.go#L2041: func (v Value) Pointer() uintptr {
value.go#L2090: func (v Value) Recv() (x Value, ok bool) {
value.go#L2098: func (v Value) recv(nb bool) (val Value, ok bool) {
value.go#L2104: val = Value{t, nil, flag(t.Kind())}
value.go#L2115: val = Value{}
value.go#L2123: func (v Value) Send(x Value) {
value.go#L2131: func (v Value) send(x Value, nb bool) (selected bool) {
value.go#L2151: func (v Value) Set(x Value) {
value.go#L2172: func (v Value) SetBool(x bool) {
value.go#L2181: func (v Value) SetBytes(x []byte) {
value.go#L2193: func (v Value) setRunes(x []rune) {
value.go#L2205: func (v Value) SetComplex(x complex128) {
value.go#L2220: func (v Value) SetFloat(x float64) {
value.go#L2235: func (v Value) SetInt(x int64) {
value.go#L2257: func (v Value) SetLen(n int) {
value.go#L2271: func (v Value) SetCap(n int) {
value.go#L2284: func (v Value) SetUint(x uint64) {
value.go#L2307: func (v Value) SetPointer(x unsafe.Pointer) {
value.go#L2315: func (v Value) SetString(x string) {
value.go#L2324: func (v Value) Slice(i, j int) Value {
value.go#L2358: return Value{v.typ(), unsafe.Pointer(&t), v.flag}
value.go#L2380: return Value{typ.Common(), unsafe.Pointer(&x), fl}
value.go#L2386: func (v Value) Slice3(i, j, k int) Value {
value.go#L2432: return Value{typ.Common(), unsafe.Pointer(&x), fl}
value.go#L2441: func (v Value) String() string {
value.go#L2449: func (v Value) stringNonString() string {
value.go#L2463: func (v Value) TryRecv() (x Value, ok bool) {
value.go#L2473: func (v Value) TrySend(x Value) bool {
value.go#L2480: func (v Value) Type() Type {
value.go#L2488: func (v Value) typeSlow() Type {
value.go#L2492: func (v Value) abiType() *abi.Type {
value.go#L2499: func (v Value) abiTypeSlow() *abi.Type {
value.go#L2531: func (v Value) CanUint() bool {
value.go#L2542: func (v Value) Uint() uint64 {
value.go#L2571: func (v Value) UnsafeAddr() uintptr {
value.go#L2597: func (v Value) UnsafePointer() unsafe.Pointer {
value.go#L2644: func (v Value) Fields() iter.Seq2[StructField, Value] {
value.go#L2649: return func(yield func(StructField, Value) bool) {
value.go#L2669: func (v Value) Methods() iter.Seq2[Method, Value] {
value.go#L2670: return func(yield func(Method, Value) bool) {
value.go#L2730: func (v Value) Grow(n int) {
value.go#L2737: func (v Value) grow(n int) {
value.go#L2756: func (v Value) extendSlice(n int) Value {
value.go#L2774: func (v Value) Clear() {
value.go#L2789: func Append(s Value, x ...Value) Value {
value.go#L2801: func AppendSlice(s, t Value) Value {
value.go#L2820: func Copy(dst, src Value) int {
value.go#L2922: Chan Value // channel to use (for send or receive)
value.go#L2923: Send Value // value to send (for send)
value.go#L2934: func Select(cases []SelectCase) (chosen int, recv Value, recvOK bool) {
value.go#L3025: recv = Value{t, p, fl | flagIndir}
value.go#L3027: recv = Value{t, *(*unsafe.Pointer)(p), fl}
value.go#L3047: func MakeSlice(typ Type, len, cap int) Value {
value.go#L3062: return Value{&typ.(*rtype).t, unsafe.Pointer(&s), flagIndir | flag(Slice)}
value.go#L3069: func SliceAt(typ Type, p unsafe.Pointer, n int) Value {
value.go#L3072: return Value{SliceOf(typ).common(), unsafe.Pointer(&s), flagIndir | flag(Slice)}
value.go#L3076: func MakeChan(typ Type, buffer int) Value {
value.go#L3088: return Value{t, ch, flag(Chan)}
value.go#L3092: func MakeMap(typ Type) Value {
value.go#L3098: func MakeMapWithSize(typ Type, n int) Value {
value.go#L3104: return Value{t, m, flag(Map)}
value.go#L3110: func Indirect(v Value) Value {
value.go#L3119: func ValueOf(i any) Value {
value.go#L3121: return Value{}
value.go#L3131: func Zero(typ Type) Value {
value.go#L3144: return Value{t, p, fl | flagIndir}
value.go#L3146: return Value{t, nil, fl}
value.go#L3154: func New(typ Type) Value {
value.go#L3166: return Value{pt, ptr, fl}
value.go#L3171: func NewAt(typ Type, p unsafe.Pointer) Value {
value.go#L3174: return Value{t.ptrTo(), p, fl}
value.go#L3182: func (v Value) assignTo(context string, dst *abi.Type, target unsafe.Pointer) Value {
value.go#L3193: return Value{dst, v.ptr, fl}
value.go#L3200: return Value{dst, nil, flag(Interface)}
value.go#L3211: return Value{dst, target, flagIndir | flag(Interface)}
value.go#L3221: func (v Value) Convert(t Type) Value {
value.go#L3234: func (v Value) CanConvert(t Type) bool {
value.go#L3259: func (v Value) Comparable() bool {
value.go#L3301: func (v Value) Equal(u Value) bool {
value.go#L3369: func convertOp(dst, src *abi.Type) func(Value, Type) Value {
value.go#L3467: func makeInt(f flag, bits uint64, t Type) Value {
value.go#L3480: return Value{typ, ptr, f | flagIndir | flag(typ.Kind())}
value.go#L3485: func makeFloat(f flag, v float64, t Type) Value {
value.go#L3494: return Value{typ, ptr, f | flagIndir | flag(typ.Kind())}
value.go#L3498: func makeFloat32(f flag, v float32, t Type) Value {
value.go#L3502: return Value{typ, ptr, f | flagIndir | flag(typ.Kind())}
value.go#L3507: func makeComplex(f flag, v complex128, t Type) Value {
value.go#L3516: return Value{typ, ptr, f | flagIndir | flag(typ.Kind())}
value.go#L3519: func makeString(f flag, v string, t Type) Value {
value.go#L3526: func makeBytes(f flag, v []byte, t Type) Value {
value.go#L3533: func makeRunes(f flag, v []rune, t Type) Value {
value.go#L3546: func cvtInt(v Value, t Type) Value {
value.go#L3551: func cvtUint(v Value, t Type) Value {
value.go#L3556: func cvtFloatInt(v Value, t Type) Value {
value.go#L3561: func cvtFloatUint(v Value, t Type) Value {
value.go#L3566: func cvtIntFloat(v Value, t Type) Value {
value.go#L3571: func cvtUintFloat(v Value, t Type) Value {
value.go#L3576: func cvtFloat(v Value, t Type) Value {
value.go#L3587: func cvtComplex(v Value, t Type) Value {
value.go#L3592: func cvtIntString(v Value, t Type) Value {
value.go#L3601: func cvtUintString(v Value, t Type) Value {
value.go#L3610: func cvtBytesString(v Value, t Type) Value {
value.go#L3615: func cvtStringBytes(v Value, t Type) Value {
value.go#L3620: func cvtRunesString(v Value, t Type) Value {
value.go#L3625: func cvtStringRunes(v Value, t Type) Value {
value.go#L3630: func cvtSliceArrayPtr(v Value, t Type) Value {
value.go#L3636: return Value{t.common(), h.Data, v.flag&^(flagIndir|flagAddr|flagKindMask) | flag(Pointer)}
value.go#L3640: func cvtSliceArray(v Value, t Type) Value {
value.go#L3652: return Value{typ, ptr, v.flag&^(flagAddr|flagKindMask) | flag(Array)}
value.go#L3656: func cvtDirect(v Value, typ Type) Value {
value.go#L3667: return Value{t, ptr, v.flag.ro() | f} // v.flag.ro()|f == f?
value.go#L3671: func cvtT2I(v Value, typ Type) Value {
value.go#L3679: return Value{typ.common(), target, v.flag.ro() | flagIndir | flag(Interface)}
value.go#L3683: 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#L500: func appendBoolSliceReflect(dst *strings.Builder, rv reflect.Value) {
value.go#L574: func appendInt64SliceReflect(dst *strings.Builder, rv reflect.Value) {
value.go#L671: func appendFloat64SliceReflect(dst *strings.Builder, rv reflect.Value) {
value.go#L756: func appendStringSliceReflect(dst *strings.Builder, rv reflect.Value) {
value.go#L842: func appendValueSliceReflect(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 {
 |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |