func FlattenToV1(objs []runtime.Object) []*unstructured.Unstructured {
	ret := make([]*unstructured.Unstructured, 0, len(objs))
	for _, obj := range objs {
		switch o := obj.(type) {
		case *unstructured.UnstructuredList:
			for i := range o.Items {
				ret = append(ret, &o.Items[i])
			}
		case *unstructured.Unstructured:
			ret = append(ret, o)
		default:
			panic("Unexpected unstructured object type")
		}
	}
	return ret
}
func FlattenToV1(objs []runtime.Object) []*unstructured.Unstructured {
	ret := make([]*unstructured.Unstructured, 0, len(objs))
	for _, obj := range objs {
		switch o := obj.(type) {
		case *unstructured.UnstructuredList:
			for i := range o.Items {
				ret = append(ret, &o.Items[i])
			}
		case *unstructured.Unstructured:
			ret = append(ret, o)
		default:
			panic("Unexpected unstructured object type")
		}
	}
	return ret
}
func FlattenToV1 ( objs [ ] runtime . Object ) [ ] * unstructured . Unstructured { ret := make ( [ ] * unstructured . Unstructured , 0 , len ( objs ) ) for _ , obj := range objs { switch o := obj . ( type ) { case * unstructured . UnstructuredList : for i := range o . Items { ret = append ( ret , & o . Items [ i ] ) } case * unstructured . Unstructured : ret = append ( ret , o ) default : panic ( " " ) } } return ret }
// FlattenToV1 expands any List-type objects into their members, and
// cooerces everything to v1.Unstructured.  Panics if coercion
// encounters an unexpected object type.
FlattenToV1 expands any List - type objects into their members and cooerces everything to v1 . Unstructured . Panics if coercion encounters an unexpected object type .