reflect.Value.Type (method)

138 uses

	reflect (current package)
		deepequal.go#L31: 	if v1.Type() != v2.Type() {
		deepequal.go#L80: 		typ := v1.Type()
		deepequal.go#L109: 		if v1.Type().Elem().Kind() == Uint8 {
		deepequal.go#L235: 	if v1.Type() != v2.Type() {
		iter.go#L41: 			rf := MakeFunc(v.Type().In(0), func(in []Value) []Value {
		iter.go#L49: 		return rangeNum[int](v.Int(), v.Type())
		iter.go#L51: 		return rangeNum[int8](v.Int(), v.Type())
		iter.go#L53: 		return rangeNum[int16](v.Int(), v.Type())
		iter.go#L55: 		return rangeNum[int32](v.Int(), v.Type())
		iter.go#L57: 		return rangeNum[int64](v.Int(), v.Type())
		iter.go#L59: 		return rangeNum[uint](v.Uint(), v.Type())
		iter.go#L61: 		return rangeNum[uint8](v.Uint(), v.Type())
		iter.go#L63: 		return rangeNum[uint16](v.Uint(), v.Type())
		iter.go#L65: 		return rangeNum[uint32](v.Uint(), v.Type())
		iter.go#L67: 		return rangeNum[uint64](v.Uint(), v.Type())
		iter.go#L69: 		return rangeNum[uintptr](v.Uint(), v.Type())
		iter.go#L116: 	panic("reflect: " + v.Type().String() + " cannot produce iter.Seq[Value]")
		iter.go#L127: 			rf := MakeFunc(v.Type().In(0), func(in []Value) []Value {
		iter.go#L172: 	panic("reflect: " + v.Type().String() + " cannot produce iter.Seq2[Value, Value]")
		makefunc.go#L108: 	ftyp := (*funcType)(unsafe.Pointer(v.Type().(*rtype)))
		swapper.go#L35: 	typ := v.Type().Elem().common()
		value.go#L441: 		if xt, targ := in[i].Type(), t.In(i); !xt.AssignableTo(toRType(targ)) {
		value.go#L452: 			if xt := x.Type(); !xt.AssignableTo(elem) {
		value.go#L1727: 			if !v.Field(i).IsZero() && v.Type().Field(i).Name != "_" {
		value.go#L2455: 	return "<" + v.Type().String() + " Value>"
		value.go#L2480: func (v Value) Type() Type {
		value.go#L2645: 	t := v.Type()
		value.go#L2671: 		rtype := v.Type()
		value.go#L2804: 	typesMustMatch("reflect.AppendSlice", s.Type().Elem(), t.Type().Elem())
		value.go#L3235: 	vt := v.Type()
		value.go#L3266: 		switch v.Type().Elem().Kind() {
		value.go#L3268: 			for i := 0; i < v.Type().Len(); i++ {
		value.go#L3275: 		return v.Type().Comparable()
		value.go#L3289: 		return v.Type().Comparable()
		value.go#L3313: 	if v.Kind() != u.Kind() || v.Type() != u.Type() {
		value.go#L3341: 			if !v.Type().Elem().Comparable() {
		value.go#L3364: 	panic("reflect.Value.Equal: values of type " + v.Type().String() + " are not comparable")
		value.go#L3577: 	if v.Type().Kind() == Float32 && t.Kind() == Float32 {

	encoding/asn1
		asn1.go#L711: 	fieldType := v.Type()
		asn1.go#L943: 		if val.Type().Size() == 4 {
		asn1.go#L1032: 	err = StructuralError{"unsupported: " + v.Type().String()}
		marshal.go#L459: 	switch value.Type() {
		marshal.go#L488: 		t := v.Type()
		marshal.go#L536: 		sliceType := v.Type()
		marshal.go#L584: 	if v.Kind() == reflect.Interface && v.Type().NumMethod() == 0 {
		marshal.go#L593: 		defaultValue := reflect.New(v.Type()).Elem()
		marshal.go#L605: 		if reflect.DeepEqual(v.Interface(), reflect.Zero(v.Type()).Interface()) {
		marshal.go#L610: 	if v.Type() == rawValueType {
		marshal.go#L624: 	matchAny, tag, isCompound, ok := getUniversalType(v.Type())
		marshal.go#L626: 		return nil, StructuralError{fmt.Sprintf("unknown Go type: %v", v.Type())}

	encoding/binary
		binary.go#L701: 		t := v.Type().Elem()
		binary.go#L715: 		t := v.Type()
		binary.go#L725: 			return sizeof(v.Type())
		binary.go#L854: 		t := v.Type()
		binary.go#L923: 		t := v.Type()

	encoding/json
		decode.go#L450: 	if v.Kind() != reflect.Pointer && v.Type().Name() != "" && v.CanAddr() {
		decode.go#L482: 			v.Set(reflect.New(v.Type().Elem()))
		decode.go#L484: 		if v.Type().NumMethod() > 0 && v.CanInterface() {
		decode.go#L516: 		d.saveError(&UnmarshalTypeError{Value: "array", Type: v.Type(), Offset: int64(d.off)})
		decode.go#L534: 		d.saveError(&UnmarshalTypeError{Value: "array", Type: v.Type(), Offset: int64(d.off)})
		decode.go#L594: 		v.Set(reflect.MakeSlice(v.Type(), 0, 0))
		decode.go#L613: 		d.saveError(&UnmarshalTypeError{Value: "object", Type: v.Type(), Offset: int64(d.off)})
		decode.go#L618: 	t := v.Type()
		decode.go#L718: 								d.saveError(fmt.Errorf("json: cannot set embedded pointer to unexported struct: %v", subv.Type().Elem()))
		decode.go#L725: 							subv.Set(reflect.New(subv.Type().Elem()))
		decode.go#L732: 							subv.Type().Field(ind).Name,
		decode.go#L764: 				d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal unquoted value into %v", subv.Type()))
		decode.go#L860: 		d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
		decode.go#L871: 				d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
		decode.go#L881: 			d.saveError(&UnmarshalTypeError{Value: val, Type: v.Type(), Offset: int64(d.readIndex())})
		decode.go#L887: 				return fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())
		decode.go#L901: 			d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
		decode.go#L914: 			d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
		decode.go#L920: 				d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
		decode.go#L922: 				d.saveError(&UnmarshalTypeError{Value: "bool", Type: v.Type(), Offset: int64(d.readIndex())})
		decode.go#L930: 				d.saveError(&UnmarshalTypeError{Value: "bool", Type: v.Type(), Offset: int64(d.readIndex())})
		decode.go#L938: 				return fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())
		decode.go#L944: 			d.saveError(&UnmarshalTypeError{Value: "string", Type: v.Type(), Offset: int64(d.readIndex())})
		decode.go#L946: 			if v.Type().Elem().Kind() != reflect.Uint8 {
		decode.go#L947: 				d.saveError(&UnmarshalTypeError{Value: "string", Type: v.Type(), Offset: int64(d.readIndex())})
		decode.go#L959: 			if v.Type() == numberType && !isValidNumber(t) {
		decode.go#L967: 				d.saveError(&UnmarshalTypeError{Value: "string", Type: v.Type(), Offset: int64(d.readIndex())})
		decode.go#L974: 				return fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())
		decode.go#L980: 			if v.Kind() == reflect.String && v.Type() == numberType {
		decode.go#L987: 				return fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())
		decode.go#L989: 			d.saveError(&UnmarshalTypeError{Value: "number", Type: v.Type(), Offset: int64(d.readIndex())})
		decode.go#L997: 				d.saveError(&UnmarshalTypeError{Value: "number", Type: v.Type(), Offset: int64(d.readIndex())})
		decode.go#L1005: 				d.saveError(&UnmarshalTypeError{Value: "number " + string(item), Type: v.Type(), Offset: int64(d.readIndex())})
		decode.go#L1013: 				d.saveError(&UnmarshalTypeError{Value: "number " + string(item), Type: v.Type(), Offset: int64(d.readIndex())})
		decode.go#L1019: 			n, err := strconv.ParseFloat(string(item), v.Type().Bits())
		decode.go#L1021: 				d.saveError(&UnmarshalTypeError{Value: "number " + string(item), Type: v.Type(), Offset: int64(d.readIndex())})
		encode.go#L385: 	return typeEncoder(v.Type())
		encode.go#L491: 		e.error(&MarshalerError{v.Type(), err, "MarshalJSON"})
		encode.go#L510: 		e.error(&MarshalerError{v.Type(), err, "MarshalJSON"})
		encode.go#L526: 		e.error(&MarshalerError{v.Type(), err, "MarshalText"})
		encode.go#L540: 		e.error(&MarshalerError{v.Type(), err, "MarshalText"})
		encode.go#L611: 	if v.Type() == numberType {
		encode.go#L704: 	e.error(&UnsupportedTypeError{v.Type()})
		encode.go#L775: 			e.error(&UnsupportedValueError{v, fmt.Sprintf("encountered a cycle via %s", v.Type())})
		encode.go#L790: 			e.error(fmt.Errorf("json: encoding error for type %q: %q", v.Type().String(), err.Error()))
		encode.go#L858: 			e.error(&UnsupportedValueError{v, fmt.Sprintf("encountered a cycle via %s", v.Type())})
		encode.go#L914: 			e.error(&UnsupportedValueError{v, fmt.Sprintf("encountered a cycle via %s", v.Type())})
		encode.go#L1216: 									v2 := reflect.New(v.Type()).Elem()

	fmt
		print.go#L378: 	p.buf.writeString(v.Type().String())
		print.go#L393: 		p.buf.writeString(p.value.Type().String())
		print.go#L564: 			p.buf.writeString(value.Type().String())
		print.go#L808: 			p.buf.writeString(f.Type().String())
		print.go#L837: 			p.buf.writeString(f.Type().String())
		print.go#L849: 				if name := f.Type().Field(i).Name; name != "" {
		print.go#L861: 				p.buf.writeString(f.Type().String())
		print.go#L873: 			t := f.Type()
		print.go#L892: 			p.buf.writeString(f.Type().String())
		scan.go#L1021: 			s.errorString("type not a pointer: " + val.Type().String())
		scan.go#L1028: 			v.SetInt(s.scanInt(verb, v.Type().Bits()))
		scan.go#L1030: 			v.SetUint(s.scanUint(verb, v.Type().Bits()))
		scan.go#L1035: 			typ := v.Type()
		scan.go#L1037: 				s.errorString("can't scan type: " + val.Type().String())
		scan.go#L1047: 			v.SetFloat(s.convertFloat(s.floatToken(), v.Type().Bits()))
		scan.go#L1049: 			v.SetComplex(s.scanComplex(verb, v.Type().Bits()))
		scan.go#L1051: 			s.errorString("can't scan type: " + val.Type().String())

	go.opentelemetry.io/otel/attribute
		value.go#L270: 	if !rv.IsValid() || rv.Kind() != reflect.Array || rv.Type().Elem() != reflect.TypeFor[Value]() {

	go.opentelemetry.io/otel/attribute/internal
		attribute.go#L67: 	if !rv.IsValid() || rv.Kind() != reflect.Array || rv.Type().Elem() != reflect.TypeFor[T]() {

	internal/fmtsort
		sort.go#L50: 	if mapValue.Type().Kind() != reflect.Map {
		sort.go#L73: 	aType, bType := aVal.Type(), bVal.Type()
		sort.go#L127: 		c := compare(reflect.ValueOf(aVal.Elem().Type()), reflect.ValueOf(bVal.Elem().Type()))

	net/http
		h2_error.go#L15: 	dstType := dst.Type()
		h2_error.go#L20: 	srcType := src.Type()
		h2_error.go#L34: 		df.Set(src.Field(i).Convert(df.Type()))
		transport.go#L414: 	if rv := reflect.ValueOf(altProto["https"]); rv.IsValid() && rv.Type().Kind() == reflect.Struct && rv.Type().NumField() == 1 {

	net/http/httptrace
		trace.go#L181: 	structType := tv.Type()
		trace.go#L184: 		hookType := tf.Type()