Deeply copy JSONSchemaProps.XValidations.

This commit is contained in:
Ben Luddy 2022-02-04 14:24:11 -05:00
parent 2a2e3db782
commit 5af2984a37
No known key found for this signature in database
GPG Key ID: E01DF04B82AF03C0
3 changed files with 18 additions and 0 deletions

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}