reflect.Value.Convert (method)
30 uses
reflect (current package)
value.go#L2457: func (v Value) Convert(t Type) Value {
database/sql
convert.go#L412: dv.Set(sv.Convert(dv.Type()))
encoding/json
decode.go#L783: kv = reflect.ValueOf(key).Convert(kt)
decode.go#L793: kv = reflect.ValueOf(n).Convert(kt)
decode.go#L801: kv = reflect.ValueOf(n).Convert(kt)
github.com/aws/aws-sdk-go/private/protocol/rest
build.go#L104: m = m.Convert(byteSliceType)
github.com/google/go-cmp/cmp
export_unsafe.go#L32: return reflect.ValueOf(ve.Interface()).Convert(f.Type)
github.com/jackc/pgtype
convert.go#L160: return refVal.Convert(timeType).Interface(), true
convert.go#L181: return refVal.Convert(uuidType).Interface(), true
convert.go#L201: convVal := refVal.Convert(baseSliceType)
convert.go#L415: nextDst := dstPtr.Convert(reflect.PtrTo(baseValType))
convert.go#L422: nextDst := dstPtr.Convert(baseSliceType)
convert.go#L430: nextDst := dstPtr.Convert(baseArrayType)
github.com/lann/builder
reflect.go#L8: Convert(reflect.TypeOf(to)).
registry.go#L26: emptyValue := emptyBuilderValue.Convert(builderType)
google.golang.org/protobuf/internal/impl
convert.go#L158: return reflect.ValueOf(v.Bool()).Convert(c.goType)
convert.go#L182: return reflect.ValueOf(int32(v.Int())).Convert(c.goType)
convert.go#L206: return reflect.ValueOf(int64(v.Int())).Convert(c.goType)
convert.go#L230: return reflect.ValueOf(uint32(v.Uint())).Convert(c.goType)
convert.go#L254: return reflect.ValueOf(uint64(v.Uint())).Convert(c.goType)
convert.go#L278: return reflect.ValueOf(float32(v.Float())).Convert(c.goType)
convert.go#L302: return reflect.ValueOf(float64(v.Float())).Convert(c.goType)
convert.go#L323: return pref.ValueOfString(v.Convert(stringType).String())
convert.go#L332: return reflect.ValueOf(s).Convert(c.goType)
convert.go#L356: return pref.ValueOfBytes(v.Convert(bytesType).Bytes())
convert.go#L359: return reflect.ValueOf(v.Bytes()).Convert(c.goType)
convert.go#L394: return reflect.ValueOf(v.Enum()).Convert(c.goType)
enum.go#L19: return reflect.ValueOf(n).Convert(t.GoReflectType).Interface().(pref.Enum)
gopkg.in/yaml.v2
encode.go#L200: slice := in.Convert(reflect.TypeOf([]MapItem{})).Interface().([]MapItem)
text/template
funcs.go#L166: value = value.Convert(argType)
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin 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. |