func autoConvert_v1_EgressNetworkPolicySpec_To_api_EgressNetworkPolicySpec(in *EgressNetworkPolicySpec, out *api.EgressNetworkPolicySpec, s conversion.Scope) error {
	if in.Egress != nil {
		in, out := &in.Egress, &out.Egress
		*out = make([]api.EgressNetworkPolicyRule, len(*in))
		for i := range *in {
			if err := Convert_v1_EgressNetworkPolicyRule_To_api_EgressNetworkPolicyRule(&(*in)[i], &(*out)[i], s); err != nil {
				return err
			}
		}
	} else {
		out.Egress = nil
	}
	return nil
}
Ejemplo n.º 2
0
func autoConvert_v1_EgressNetworkPolicySpec_To_api_EgressNetworkPolicySpec(in *EgressNetworkPolicySpec, out *api.EgressNetworkPolicySpec, s conversion.Scope) error {
	out.Egress = *(*[]api.EgressNetworkPolicyRule)(unsafe.Pointer(&in.Egress))
	return nil
}