Skip to content

Commit

Permalink
Merge pull request #107956 from benluddy/xvalidations-deepcopy
Browse files Browse the repository at this point in the history
Deeply copy JSONSchemaProps.XValidations.
  • Loading branch information
k8s-ci-robot committed Feb 5, 2022
2 parents 6410dda + 5af2984 commit 8dee712
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
Expand Up @@ -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
}
Expand Up @@ -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
}
Expand Up @@ -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
}

0 comments on commit 8dee712

Please sign in to comment.