type reflect.Value
360 uses
reflect (current package)
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 {
makefunc.go#L22: fn func([]Value) []Value
makefunc.go#L46: func MakeFunc(typ Type, fn func(args []Value) (results []Value)) Value {
makefunc.go#L70: return Value{t, unsafe.Pointer(impl), flag(Func)}
makefunc.go#L86: rcvr Value
makefunc.go#L96: func makeMethodValue(op string, v Value) Value {
makefunc.go#L104: rcvr := Value{v.typ(), v.ptr, fl}
makefunc.go#L129: return Value{ftyp.Common(), unsafe.Pointer(fv), v.flag&flagRO | flag(Func)}
type.go#L425: Func Value // func with receiver as first argument
type.go#L612: m.Func = Value{&mt.(*rtype).t, fn, fl}
type.go#L2221: ifn Value
type.go#L2222: tfn Value
type.go#L2226: tfn = MakeFunc(toRType(mtyp), func(in []Value) []Value {
type.go#L2227: var args []Value
type.go#L2234: ifn = MakeFunc(toRType(mtyp), func(in []Value) []Value {
type.go#L2235: var args []Value
type.go#L2243: tfn = MakeFunc(toRType(mtyp), func(in []Value) []Value {
type.go#L2244: var args []Value
type.go#L2251: ifn = MakeFunc(toRType(mtyp), func(in []Value) []Value {
type.go#L2252: var args []Value
value.go#L39: type Value struct {
value.go#L96: func (v Value) typ() *abi.Type {
value.go#L108: func (v Value) pointer() unsafe.Pointer {
value.go#L119: func packEface(v Value) any {
value.go#L156: func unpackEface(i any) Value {
value.go#L161: return Value{}
value.go#L167: return Value{t, e.word, f}
value.go#L281: func (v Value) Addr() Value {
value.go#L288: return Value{ptrTo(v.typ()), v.ptr, fl | flag(Pointer)}
value.go#L293: func (v Value) Bool() bool {
value.go#L301: func (v Value) panicNotBool() {
value.go#L310: func (v Value) Bytes() []byte {
value.go#L318: func (v Value) bytesSlow() []byte {
value.go#L342: func (v Value) runes() []rune {
value.go#L356: func (v Value) CanAddr() bool {
value.go#L365: func (v Value) CanSet() bool {
value.go#L377: func (v Value) Call(in []Value) []Value {
value.go#L390: func (v Value) CallSlice(in []Value) []Value {
value.go#L400: func (v Value) call(op string, in []Value) []Value {
value.go#L405: rcvr Value
value.go#L468: in = make([]Value, n+1)
value.go#L603: var ret []Value
value.go#L618: ret = make([]Value, nout)
value.go#L633: ret[i] = Value{tv, add(stackArgs, st.stkOff, "tv.Size() != 0"), fl}
value.go#L649: ret[i] = Value{tv, regArgs.Ptrs[steps[0].ireg], flag(tv.Kind())}
value.go#L680: ret[i] = Value{tv, s, flagIndir | flag(tv.Kind())}
value.go#L723: in := make([]Value, 0, int(ftyp.InCount))
value.go#L729: v := Value{typ, nil, flag(typ.Kind())}
value.go#L887: func methodReceiver(op string, v Value, methodIndex int) (rcvrtype *abi.Type, t *funcType, fn unsafe.Pointer) {
value.go#L926: func storeRcvr(v Value, p unsafe.Pointer) {
value.go#L1154: func funcName(f func([]Value) []Value) string {
value.go#L1165: func (v Value) Cap() int {
value.go#L1173: func (v Value) capNonSlice() int {
value.go#L1191: func (v Value) Close() {
value.go#L1198: func (v Value) CanComplex() bool {
value.go#L1209: func (v Value) Complex() complex128 {
value.go#L1224: func (v Value) Elem() Value {
value.go#L1263: return Value{}
value.go#L1269: return Value{typ, ptr, fl}
value.go#L1276: func (v Value) Field(i int) Value {
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#L1532: func (v Value) InterfaceData() [2]uintptr {
value.go#L1551: func (v Value) IsNil() bool {
value.go#L1576: func (v Value) IsValid() bool {
value.go#L1582: func (v Value) IsZero() bool {
value.go#L1644: func (v Value) SetZero() {
value.go#L1698: func (v Value) Kind() Kind {
value.go#L1704: func (v Value) Len() int {
value.go#L1712: func (v Value) lenNonSlice() int {
value.go#L1739: func (v Value) MapIndex(key Value) Value {
value.go#L1766: return Value{}
value.go#L1778: func (v Value) MapKeys() []Value {
value.go#L1792: a := make([]Value, mlen)
value.go#L1837: m Value
value.go#L1842: func (iter *MapIter) Key() Value {
value.go#L1860: func (v Value) SetIterKey(iter *MapIter) {
value.go#L1879: key := Value{ktype, iterkey, iter.m.flag | flag(ktype.Kind()) | flagIndir}
value.go#L1885: func (iter *MapIter) Value() Value {
value.go#L1903: func (v Value) SetIterValue(iter *MapIter) {
value.go#L1922: elem := Value{vtype, iterelem, iter.m.flag | flag(vtype.Kind()) | flagIndir}
value.go#L1949: func (iter *MapIter) Reset(v Value) {
value.go#L1972: func (v Value) MapRange() *MapIter {
value.go#L1994: func copyVal(typ *abi.Type, fl flag, ptr unsafe.Pointer) Value {
value.go#L2000: return Value{typ, c, fl | flagIndir}
value.go#L2002: return Value{typ, *(*unsafe.Pointer)(ptr), fl}
value.go#L2009: func (v Value) Method(i int) Value {
value.go#L2022: return Value{v.typ(), v.ptr, fl}
value.go#L2030: func (v Value) NumMethod() int {
value.go#L2045: func (v Value) MethodByName(name string) Value {
value.go#L2050: return Value{}
value.go#L2054: return Value{}
value.go#L2061: func (v Value) NumField() int {
value.go#L2069: func (v Value) OverflowComplex(x complex128) bool {
value.go#L2082: func (v Value) OverflowFloat(x float64) bool {
value.go#L2102: func (v Value) OverflowInt(x int64) bool {
value.go#L2115: func (v Value) OverflowUint(x uint64) bool {
value.go#L2144: func (v Value) Pointer() uintptr {
value.go#L2192: func (v Value) Recv() (x Value, ok bool) {
value.go#L2200: func (v Value) recv(nb bool) (val Value, ok bool) {
value.go#L2206: val = Value{t, nil, flag(t.Kind())}
value.go#L2217: val = Value{}
value.go#L2225: func (v Value) Send(x Value) {
value.go#L2233: func (v Value) send(x Value, nb bool) (selected bool) {
value.go#L2253: func (v Value) Set(x Value) {
value.go#L2274: func (v Value) SetBool(x bool) {
value.go#L2282: func (v Value) SetBytes(x []byte) {
value.go#L2293: func (v Value) setRunes(x []rune) {
value.go#L2304: func (v Value) SetComplex(x complex128) {
value.go#L2318: func (v Value) SetFloat(x float64) {
value.go#L2332: func (v Value) SetInt(x int64) {
value.go#L2353: func (v Value) SetLen(n int) {
value.go#L2366: func (v Value) SetCap(n int) {
value.go#L2382: func (v Value) SetMapIndex(key, elem Value) {
value.go#L2430: func (v Value) SetUint(x uint64) {
value.go#L2452: func (v Value) SetPointer(x unsafe.Pointer) {
value.go#L2460: func (v Value) SetString(x string) {
value.go#L2469: func (v Value) Slice(i, j int) Value {
value.go#L2503: return Value{v.typ(), unsafe.Pointer(&t), v.flag}
value.go#L2525: return Value{typ.Common(), unsafe.Pointer(&x), fl}
value.go#L2531: func (v Value) Slice3(i, j, k int) Value {
value.go#L2577: return Value{typ.Common(), unsafe.Pointer(&x), fl}
value.go#L2586: func (v Value) String() string {
value.go#L2594: func (v Value) stringNonString() string {
value.go#L2608: func (v Value) TryRecv() (x Value, ok bool) {
value.go#L2618: func (v Value) TrySend(x Value) bool {
value.go#L2625: func (v Value) Type() Type {
value.go#L2632: func (v Value) typeSlow() Type {
value.go#L2664: func (v Value) CanUint() bool {
value.go#L2675: func (v Value) Uint() uint64 {
value.go#L2704: func (v Value) UnsafeAddr() uintptr {
value.go#L2727: func (v Value) UnsafePointer() unsafe.Pointer {
value.go#L2817: func (v Value) Grow(n int) {
value.go#L2824: func (v Value) grow(n int) {
value.go#L2843: func (v Value) extendSlice(n int) Value {
value.go#L2861: func (v Value) Clear() {
value.go#L2876: func Append(s Value, x ...Value) Value {
value.go#L2888: func AppendSlice(s, t Value) Value {
value.go#L2906: func Copy(dst, src Value) int {
value.go#L3008: Chan Value // channel to use (for send or receive)
value.go#L3009: Send Value // value to send (for send)
value.go#L3020: func Select(cases []SelectCase) (chosen int, recv Value, recvOK bool) {
value.go#L3111: recv = Value{t, p, fl | flagIndir}
value.go#L3113: recv = Value{t, *(*unsafe.Pointer)(p), fl}
value.go#L3133: func MakeSlice(typ Type, len, cap int) Value {
value.go#L3148: return Value{&typ.(*rtype).t, unsafe.Pointer(&s), flagIndir | flag(Slice)}
value.go#L3152: func MakeChan(typ Type, buffer int) Value {
value.go#L3164: return Value{t, ch, flag(Chan)}
value.go#L3168: func MakeMap(typ Type) Value {
value.go#L3174: func MakeMapWithSize(typ Type, n int) Value {
value.go#L3180: return Value{t, m, flag(Map)}
value.go#L3186: func Indirect(v Value) Value {
value.go#L3203: func ValueOf(i any) Value {
value.go#L3205: return Value{}
value.go#L3220: func Zero(typ Type) Value {
value.go#L3233: return Value{t, p, fl | flagIndir}
value.go#L3235: return Value{t, nil, fl}
value.go#L3246: func New(typ Type) Value {
value.go#L3258: return Value{pt, ptr, fl}
value.go#L3263: func NewAt(typ Type, p unsafe.Pointer) Value {
value.go#L3266: return Value{t.ptrTo(), p, fl}
value.go#L3274: func (v Value) assignTo(context string, dst *abi.Type, target unsafe.Pointer) Value {
value.go#L3285: return Value{dst, v.ptr, fl}
value.go#L3292: return Value{dst, nil, flag(Interface)}
value.go#L3303: return Value{dst, target, flagIndir | flag(Interface)}
value.go#L3313: func (v Value) Convert(t Type) Value {
value.go#L3326: func (v Value) CanConvert(t Type) bool {
value.go#L3351: func (v Value) Comparable() bool {
value.go#L3393: func (v Value) Equal(u Value) bool {
value.go#L3461: func convertOp(dst, src *abi.Type) func(Value, Type) Value {
value.go#L3559: func makeInt(f flag, bits uint64, t Type) Value {
value.go#L3572: return Value{typ, ptr, f | flagIndir | flag(typ.Kind())}
value.go#L3577: func makeFloat(f flag, v float64, t Type) Value {
value.go#L3586: return Value{typ, ptr, f | flagIndir | flag(typ.Kind())}
value.go#L3590: func makeFloat32(f flag, v float32, t Type) Value {
value.go#L3594: return Value{typ, ptr, f | flagIndir | flag(typ.Kind())}
value.go#L3599: func makeComplex(f flag, v complex128, t Type) Value {
value.go#L3608: return Value{typ, ptr, f | flagIndir | flag(typ.Kind())}
value.go#L3611: func makeString(f flag, v string, t Type) Value {
value.go#L3618: func makeBytes(f flag, v []byte, t Type) Value {
value.go#L3625: func makeRunes(f flag, v []rune, t Type) Value {
value.go#L3638: func cvtInt(v Value, t Type) Value {
value.go#L3643: func cvtUint(v Value, t Type) Value {
value.go#L3648: func cvtFloatInt(v Value, t Type) Value {
value.go#L3653: func cvtFloatUint(v Value, t Type) Value {
value.go#L3658: func cvtIntFloat(v Value, t Type) Value {
value.go#L3663: func cvtUintFloat(v Value, t Type) Value {
value.go#L3668: func cvtFloat(v Value, t Type) Value {
value.go#L3679: func cvtComplex(v Value, t Type) Value {
value.go#L3684: func cvtIntString(v Value, t Type) Value {
value.go#L3693: func cvtUintString(v Value, t Type) Value {
value.go#L3702: func cvtBytesString(v Value, t Type) Value {
value.go#L3707: func cvtStringBytes(v Value, t Type) Value {
value.go#L3712: func cvtRunesString(v Value, t Type) Value {
value.go#L3717: func cvtStringRunes(v Value, t Type) Value {
value.go#L3722: func cvtSliceArrayPtr(v Value, t Type) Value {
value.go#L3728: return Value{t.common(), h.Data, v.flag&^(flagIndir|flagAddr|flagKindMask) | flag(Pointer)}
value.go#L3732: func cvtSliceArray(v Value, t Type) Value {
value.go#L3744: return Value{typ, ptr, v.flag&^(flagAddr|flagKindMask) | flag(Array)}
value.go#L3748: func cvtDirect(v Value, typ Type) Value {
value.go#L3759: return Value{t, ptr, v.flag.ro() | f} // v.flag.ro()|f == f?
value.go#L3763: func cvtT2I(v Value, typ Type) Value {
value.go#L3771: return Value{typ.common(), target, v.flag.ro() | flagIndir | flag(Interface)}
value.go#L3775: func cvtI2I(v Value, typ Type) Value {
encoding/asn1
asn1.go#L608: func parseSequenceOf(bytes []byte, sliceType reflect.Type, elemType reflect.Type) (ret reflect.Value, err error) {
asn1.go#L678: func parseField(v reflect.Value, bytes []byte, initOffset int, params fieldParameters) (offset int, err error) {
asn1.go#L1008: func setDefaultValue(v reflect.Value, params fieldParameters) (ok bool) {
marshal.go#L461: 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#L476: func dataSize(v reflect.Value) int {
binary.go#L614: func (d *decoder) value(v reflect.Value) {
binary.go#L683: func (e *encoder) value(v reflect.Value) {
binary.go#L758: func (d *decoder) skip(v reflect.Value) {
binary.go#L762: func (e *encoder) skip(v reflect.Value) {
encoding/json
decode.go#L357: func (d *decodeState) value(v reflect.Value) error {
decode.go#L426: func indirect(v reflect.Value, decodingNull bool) (Unmarshaler, encoding.TextUnmarshaler, reflect.Value) {
decode.go#L480: return u, nil, reflect.Value{}
decode.go#L484: return nil, u, reflect.Value{}
decode.go#L501: func (d *decodeState) array(v reflect.Value) error {
decode.go#L560: if err := d.value(reflect.Value{}); err != nil {
decode.go#L598: func (d *decodeState) object(v reflect.Value) error {
decode.go#L654: var mapElem reflect.Value
decode.go#L681: var subv reflect.Value
decode.go#L712: subv = reflect.Value{}
decode.go#L764: var kv reflect.Value
decode.go#L842: func (d *decodeState) literalStore(item []byte, v reflect.Value, fromQuoted bool) error {
encode.go#L206: Value reflect.Value
encode.go#L304: func isEmptyValue(v reflect.Value) bool {
encode.go#L322: func (e *encodeState) reflectValue(v reflect.Value, opts encOpts) {
encode.go#L333: type encoderFunc func(e *encodeState, v reflect.Value, opts encOpts)
encode.go#L337: func valueEncoder(v reflect.Value) encoderFunc {
encode.go#L358: fi, loaded := encoderCache.LoadOrStore(t, encoderFunc(func(e *encodeState, v reflect.Value, opts encOpts) {
encode.go#L428: func invalidValueEncoder(e *encodeState, v reflect.Value, _ encOpts) {
encode.go#L432: func marshalerEncoder(e *encodeState, v reflect.Value, opts encOpts) {
encode.go#L454: func addrMarshalerEncoder(e *encodeState, v reflect.Value, opts encOpts) {
encode.go#L473: func textMarshalerEncoder(e *encodeState, v reflect.Value, opts encOpts) {
encode.go#L490: func addrTextMarshalerEncoder(e *encodeState, v reflect.Value, opts encOpts) {
encode.go#L504: func boolEncoder(e *encodeState, v reflect.Value, opts encOpts) {
encode.go#L512: func intEncoder(e *encodeState, v reflect.Value, opts encOpts) {
encode.go#L520: func uintEncoder(e *encodeState, v reflect.Value, opts encOpts) {
encode.go#L530: func (bits floatEncoder) encode(e *encodeState, v reflect.Value, opts encOpts) {
encode.go#L569: func stringEncoder(e *encodeState, v reflect.Value, opts encOpts) {
encode.go#L655: func interfaceEncoder(e *encodeState, v reflect.Value, opts encOpts) {
encode.go#L663: func unsupportedTypeEncoder(e *encodeState, v reflect.Value, _ encOpts) {
encode.go#L677: func (se structEncoder) encode(e *encodeState, v reflect.Value, opts encOpts) {
encode.go#L724: func (me mapEncoder) encode(e *encodeState, v reflect.Value, opts encOpts) {
encode.go#L779: func encodeByteSlice(e *encodeState, v reflect.Value, _ encOpts) {
encode.go#L802: func (se sliceEncoder) encode(e *encodeState, v reflect.Value, opts encOpts) {
encode.go#L842: func (ae arrayEncoder) encode(e *encodeState, v reflect.Value, opts encOpts) {
encode.go#L863: func (pe ptrEncoder) encode(e *encodeState, v reflect.Value, opts encOpts) {
encode.go#L891: func (ce condAddrEncoder) encode(e *encodeState, v reflect.Value, opts encOpts) {
encode.go#L934: k reflect.Value
encode.go#L935: v reflect.Value
flag
flag.go#L543: var z reflect.Value
fmt
print.go#L127: value reflect.Value
print.go#L179: p.value = reflect.Value{}
print.go#L341: func getField(v reflect.Value, i int) reflect.Value {
print.go#L371: func (p *pp) unknownType(v reflect.Value) {
print.go#L549: func (p *pp) fmtPointer(value reflect.Value, verb rune) {
print.go#L683: p.value = reflect.Value{}
print.go#L744: case reflect.Value:
print.go#L766: 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#L75: func (d Distinct) reflectValue() reflect.Value {
internal/fmtsort
sort.go#L22: Key []reflect.Value
sort.go#L23: Value []reflect.Value
sort.go#L51: func Sort(mapValue reflect.Value) *SortedMap {
sort.go#L59: key := make([]reflect.Value, 0, n)
sort.go#L60: value := make([]reflect.Value, 0, n)
sort.go#L78: func compare(aVal, bVal reflect.Value) int {
sort.go#L189: 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.6.7. (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 @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |