コード例 #1
0
func autoConvert_v2alpha1_ScheduledJobStatus_To_batch_ScheduledJobStatus(in *ScheduledJobStatus, out *batch.ScheduledJobStatus, s conversion.Scope) error {
	if in.Active != nil {
		in, out := &in.Active, &out.Active
		*out = make([]api.ObjectReference, len(*in))
		for i := range *in {
			// TODO: Inefficient conversion - can we improve it?
			if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil {
				return err
			}
		}
	} else {
		out.Active = nil
	}
	out.LastScheduleTime = in.LastScheduleTime
	return nil
}
コード例 #2
0
func autoConvert_v2alpha1_ScheduledJobStatus_To_batch_ScheduledJobStatus(in *ScheduledJobStatus, out *batch.ScheduledJobStatus, s conversion.Scope) error {
	out.Active = *(*[]api.ObjectReference)(unsafe.Pointer(&in.Active))
	out.LastScheduleTime = (*unversioned.Time)(unsafe.Pointer(in.LastScheduleTime))
	return nil
}