Home | History | Annotate | Download | only in proptools

Lines Matching full:reflect

19 	"reflect"
101 dstField, srcField reflect.StructField,
136 dstValues := []reflect.Value{dstValue}
144 dstValues := make([]reflect.Value, len(dst))
161 func extendPropertiesRecursive(dstValues []reflect.Value, srcValue reflect.Value,
181 var dstField reflect.StructField
203 case reflect.Interface:
214 if srcFieldValue.Kind() != reflect.Ptr || dstFieldValue.Kind() != reflect.Ptr {
219 case reflect.Ptr:
221 if ptrKind == reflect.Bool || ptrKind == reflect.String {
227 } else if ptrKind != reflect.Struct {
243 case reflect.Struct:
250 err := extendPropertiesRecursive([]reflect.Value{dstFieldValue}, srcFieldValue,
256 case reflect.Bool, reflect.String, reflect.Slice:
281 case reflect.Bool:
283 dstFieldValue.Set(reflect.ValueOf(srcFieldValue.Bool() || dstFieldValue.Bool()))
284 case reflect.String:
293 case reflect.Slice:
298 newSlice := reflect.MakeSlice(srcFieldValue.Type(), 0,
301 newSlice = reflect.AppendSlice(newSlice, srcFieldValue)
302 newSlice = reflect.AppendSlice(newSlice, dstFieldValue)
304 newSlice = reflect.AppendSlice(newSlice, dstFieldValue)
305 newSlice = reflect.AppendSlice(newSlice, srcFieldValue)
308 case reflect.Ptr:
314 case reflect.Bool:
317 dstFieldValue.Set(reflect.ValueOf(BoolPtr(srcFieldValue.Elem().Bool())))
321 dstFieldValue.Set(reflect.ValueOf(BoolPtr(srcFieldValue.Elem().Bool())))
323 case reflect.String:
326 dstFieldValue.Set(reflect.ValueOf(StringPtr(srcFieldValue.Elem().String())))
330 dstFieldValue.Set(reflect.ValueOf(StringPtr(srcFieldValue.Elem().String())))
345 func getStruct(in interface{}) (reflect.Value, error) {
346 value := reflect.ValueOf(in)
347 if value.Kind() != reflect.Ptr {
348 return reflect.Value{}, fmt.Errorf("expected pointer to struct, got %T", in)
351 if value.Kind() != reflect.Struct {
352 return reflect.Value{}, fmt.Errorf("expected pointer to struct, got %T", in)