reflect.Value.Type (method)

128 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#L234: 	if v1.Type() != v2.Type() {
		makefunc.go#L107: 	ftyp := (*funcType)(unsafe.Pointer(v.Type().(*rtype)))
		swapper.go#L35: 	typ := v.Type().Elem().common()
		value.go#L451: 		if xt, targ := in[i].Type(), t.In(i); !xt.AssignableTo(toRType(targ)) {
		value.go#L462: 			if xt := x.Type(); !xt.AssignableTo(elem) {
		value.go#L2600: 	return "<" + v.Type().String() + " Value>"
		value.go#L2625: func (v Value) Type() Type {
		value.go#L2891: 	typesMustMatch("reflect.AppendSlice", s.Type().Elem(), t.Type().Elem())
		value.go#L3327: 	vt := v.Type()
		value.go#L3358: 		switch v.Type().Elem().Kind() {
		value.go#L3360: 			for i := 0; i < v.Type().Len(); i++ {
		value.go#L3367: 		return v.Type().Comparable()
		value.go#L3381: 		return v.Type().Comparable()
		value.go#L3405: 	if v.Kind() != u.Kind() || v.Type() != u.Type() {
		value.go#L3433: 			if !v.Type().Elem().Comparable() {
		value.go#L3456: 	panic("reflect.Value.Equal: values of type " + v.Type().String() + " are not comparable")
		value.go#L3669: 	if v.Type().Kind() == Float32 && t.Kind() == Float32 {

	encoding/asn1
		asn1.go#L680: 	fieldType := v.Type()
		asn1.go#L901: 		if val.Type().Size() == 4 {
		asn1.go#L990: 	err = StructuralError{"unsupported: " + v.Type().String()}
		marshal.go#L462: 	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#L479: 		if s := sizeof(v.Type().Elem()); s >= 0 {
		binary.go#L484: 		t := v.Type()
		binary.go#L494: 			return sizeof(v.Type())
		binary.go#L623: 		t := v.Type()
		binary.go#L692: 		t := v.Type()
		binary.go#L713: 		switch v.Type().Kind() {
		binary.go#L725: 		switch v.Type().Kind() {
		binary.go#L737: 		switch v.Type().Kind() {
		binary.go#L745: 		switch v.Type().Kind() {

	encoding/json
		decode.go#L444: 	if v.Kind() != reflect.Pointer && v.Type().Name() != "" && v.CanAddr() {
		decode.go#L476: 			v.Set(reflect.New(v.Type().Elem()))
		decode.go#L478: 		if v.Type().NumMethod() > 0 && v.CanInterface() {
		decode.go#L510: 		d.saveError(&UnmarshalTypeError{Value: "array", Type: v.Type(), Offset: int64(d.off)})
		decode.go#L528: 		d.saveError(&UnmarshalTypeError{Value: "array", Type: v.Type(), Offset: int64(d.off)})
		decode.go#L588: 		v.Set(reflect.MakeSlice(v.Type(), 0, 0))
		decode.go#L607: 		d.saveError(&UnmarshalTypeError{Value: "object", Type: v.Type(), Offset: int64(d.off)})
		decode.go#L612: 	t := v.Type()
		decode.go#L709: 								d.saveError(fmt.Errorf("json: cannot set embedded pointer to unexported struct: %v", subv.Type().Elem()))
		decode.go#L716: 							subv.Set(reflect.New(subv.Type().Elem()))
		decode.go#L752: 				d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal unquoted value into %v", subv.Type()))
		decode.go#L846: 		d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
		decode.go#L857: 				d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
		decode.go#L867: 			d.saveError(&UnmarshalTypeError{Value: val, Type: v.Type(), Offset: int64(d.readIndex())})
		decode.go#L873: 				return fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())
		decode.go#L887: 			d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
		decode.go#L900: 			d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
		decode.go#L906: 				d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
		decode.go#L908: 				d.saveError(&UnmarshalTypeError{Value: "bool", Type: v.Type(), Offset: int64(d.readIndex())})
		decode.go#L916: 				d.saveError(&UnmarshalTypeError{Value: "bool", Type: v.Type(), Offset: int64(d.readIndex())})
		decode.go#L924: 				return fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())
		decode.go#L930: 			d.saveError(&UnmarshalTypeError{Value: "string", Type: v.Type(), Offset: int64(d.readIndex())})
		decode.go#L932: 			if v.Type().Elem().Kind() != reflect.Uint8 {
		decode.go#L933: 				d.saveError(&UnmarshalTypeError{Value: "string", Type: v.Type(), Offset: int64(d.readIndex())})
		decode.go#L944: 			if v.Type() == numberType && !isValidNumber(string(s)) {
		decode.go#L952: 				d.saveError(&UnmarshalTypeError{Value: "string", Type: v.Type(), Offset: int64(d.readIndex())})
		decode.go#L959: 				return fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())
		decode.go#L966: 			if v.Kind() == reflect.String && v.Type() == numberType {
		decode.go#L973: 				return fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())
		decode.go#L975: 			d.saveError(&UnmarshalTypeError{Value: "number", Type: v.Type(), Offset: int64(d.readIndex())})
		decode.go#L983: 				d.saveError(&UnmarshalTypeError{Value: "number", Type: v.Type(), Offset: int64(d.readIndex())})
		decode.go#L991: 				d.saveError(&UnmarshalTypeError{Value: "number " + s, Type: v.Type(), Offset: int64(d.readIndex())})
		decode.go#L999: 				d.saveError(&UnmarshalTypeError{Value: "number " + s, Type: v.Type(), Offset: int64(d.readIndex())})
		decode.go#L1005: 			n, err := strconv.ParseFloat(s, v.Type().Bits())
		decode.go#L1007: 				d.saveError(&UnmarshalTypeError{Value: "number " + s, Type: v.Type(), Offset: int64(d.readIndex())})
		encode.go#L341: 	return typeEncoder(v.Type())
		encode.go#L450: 		e.error(&MarshalerError{v.Type(), err, "MarshalJSON"})
		encode.go#L469: 		e.error(&MarshalerError{v.Type(), err, "MarshalJSON"})
		encode.go#L485: 		e.error(&MarshalerError{v.Type(), err, "MarshalText"})
		encode.go#L499: 		e.error(&MarshalerError{v.Type(), err, "MarshalText"})
		encode.go#L570: 	if v.Type() == numberType {
		encode.go#L664: 	e.error(&UnsupportedTypeError{v.Type()})
		encode.go#L734: 			e.error(&UnsupportedValueError{v, fmt.Sprintf("encountered a cycle via %s", v.Type())})
		encode.go#L748: 			e.error(fmt.Errorf("json: encoding error for type %q: %q", v.Type().String(), err.Error()))
		encode.go#L817: 			e.error(&UnsupportedValueError{v, fmt.Sprintf("encountered a cycle via %s", v.Type())})
		encode.go#L873: 			e.error(&UnsupportedValueError{v, fmt.Sprintf("encountered a cycle via %s", v.Type())})

	flag
		flag.go#L310: 	if defVal.Type() != ptrVal.Type().Elem() {
		flag.go#L311: 		panic(fmt.Sprintf("default type does not match variable type: %v != %v", defVal.Type(), ptrVal.Type().Elem()))

	fmt
		print.go#L377: 	p.buf.writeString(v.Type().String())
		print.go#L392: 		p.buf.writeString(p.value.Type().String())
		print.go#L563: 			p.buf.writeString(value.Type().String())
		print.go#L807: 			p.buf.writeString(f.Type().String())
		print.go#L836: 			p.buf.writeString(f.Type().String())
		print.go#L848: 				if name := f.Type().Field(i).Name; name != "" {
		print.go#L860: 				p.buf.writeString(f.Type().String())
		print.go#L872: 			t := f.Type()
		print.go#L893: 			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/internal/attribute
		attribute.go#L60: 	if rv.Type().Kind() != reflect.Array {
		attribute.go#L74: 	if rv.Type().Kind() != reflect.Array {
		attribute.go#L88: 	if rv.Type().Kind() != reflect.Array {
		attribute.go#L102: 	if rv.Type().Kind() != reflect.Array {

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

	net/http
		h2_error.go#L16: 	dstType := dst.Type()
		h2_error.go#L21: 	srcType := src.Type()
		h2_error.go#L35: 		df.Set(src.Field(i).Convert(df.Type()))
		transport.go#L382: 	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()