mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-01 17:29:00 +00:00
Merge pull request #107956 from benluddy/xvalidations-deepcopy
Deeply copy JSONSchemaProps.XValidations.
This commit is contained in:
@@ -290,5 +290,11 @@ func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps {
|
||||
**out = **in
|
||||
}
|
||||
|
||||
if in.XValidations != nil {
|
||||
in, out := &in.XValidations, &out.XValidations
|
||||
*out = make([]ValidationRule, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
|
||||
return out
|
||||
}
|
||||
|
@@ -250,5 +250,11 @@ func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps {
|
||||
**out = **in
|
||||
}
|
||||
|
||||
if in.XValidations != nil {
|
||||
in, out := &in.XValidations, &out.XValidations
|
||||
*out = make([]ValidationRule, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
|
||||
return out
|
||||
}
|
||||
|
@@ -266,5 +266,11 @@ func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps {
|
||||
**out = **in
|
||||
}
|
||||
|
||||
if in.XValidations != nil {
|
||||
in, out := &in.XValidations, &out.XValidations
|
||||
*out = make([]ValidationRule, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
|
||||
return out
|
||||
}
|
||||
|
Reference in New Issue
Block a user