Lines Matching refs:reflect
47 mi = getMergeInfo(reflect.TypeOf(dst).Elem())
54 typ reflect.Type
88 mergeInfoMap = map[reflect.Type]*mergeInfo{}
92 func getMergeInfo(t reflect.Type) *mergeInfo {
187 case reflect.Ptr, reflect.Slice, reflect.String:
192 case reflect.Bool:
194 case reflect.Int32, reflect.Uint32, reflect.Float32:
196 case reflect.Int64, reflect.Uint64, reflect.Float64:
203 if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 {
207 if tf.Kind() == reflect.Ptr {
211 if isPointer && isSlice && tf.Kind() != reflect.Struct {
216 case reflect.Int32:
272 case reflect.Int64:
304 case reflect.Uint32:
336 case reflect.Uint64:
368 case reflect.Float32:
400 case reflect.Float64:
432 case reflect.Bool:
464 case reflect.String:
496 case reflect.Slice:
501 case tf.Elem().Kind() != reflect.Uint8:
531 case reflect.Struct:
544 dp = valToPointer(reflect.New(tf))
562 dp = valToPointer(reflect.New(tf))
569 case reflect.Map:
581 dm.Set(reflect.MakeMap(tf))
585 case reflect.Ptr: // Proto struct (e.g., *T)
588 val = reflect.ValueOf(Clone(val.Interface().(Message)))
591 case reflect.Slice: // E.g. Bytes type (e.g., []byte)
594 val = reflect.ValueOf(append([]byte{}, val.Bytes()...))
605 case reflect.Interface:
618 du.Set(reflect.New(typ.Elem())) // Initialize interface if empty
621 if sv.Kind() == reflect.Ptr && sv.IsNil() {
625 if dv.Kind() == reflect.Ptr && dv.IsNil() {
626 dv.Set(reflect.New(sv.Type().Elem())) // Initialize proto message if empty
629 case reflect.Ptr: // Proto struct (e.g., *T)
631 case reflect.Slice: // E.g. Bytes type (e.g., []byte)
632 dv.Set(reflect.ValueOf(append([]byte{}, sv.Bytes()...)))
647 if f.Type != reflect.TypeOf([]byte{}) {