func deepCopy_v1_MetadataVolumeSource(in v1.MetadataVolumeSource, out *v1.MetadataVolumeSource, c *conversion.Cloner) error {
	if in.Items != nil {
		out.Items = make([]v1.MetadataFile, len(in.Items))
		for i := range in.Items {
			if err := deepCopy_v1_MetadataFile(in.Items[i], &out.Items[i], c); err != nil {
				return err
			}
		}
	} else {
		out.Items = nil
	}
	return nil
}
Beispiel #2
0
// downward -> metadata (api -> v1)
func Convert_api_DownwardAPIVolumeSource_To_v1_MetadataVolumeSource(in *api.DownwardAPIVolumeSource, out *v1.MetadataVolumeSource, s conversion.Scope) error {
	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
		defaulting.(func(*api.DownwardAPIVolumeSource))(in)
	}
	if in.Items != nil {
		out.Items = make([]v1.MetadataFile, len(in.Items))
		for i := range in.Items {
			if err := Convert_api_DownwardAPIVolumeFile_To_v1_MetadataFile(&in.Items[i], &out.Items[i], s); err != nil {
				return err
			}
		}
	}
	return nil
}