mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Merge pull request #14496 from kargakis/deep-copies-fix
deep-copies: Structs cannot be nil
This commit is contained in:
@@ -2268,8 +2268,6 @@ func deepCopy_resource_Quantity(in resource.Quantity, out *resource.Quantity, c
|
||||
if in.Amount != nil {
|
||||
if newVal, err := c.DeepCopy(in.Amount); err != nil {
|
||||
return err
|
||||
} else if newVal == nil {
|
||||
out.Amount = nil
|
||||
} else {
|
||||
out.Amount = newVal.(*inf.Dec)
|
||||
}
|
||||
|
||||
@@ -34,8 +34,6 @@ func deepCopy_resource_Quantity(in resource.Quantity, out *resource.Quantity, c
|
||||
if in.Amount != nil {
|
||||
if newVal, err := c.DeepCopy(in.Amount); err != nil {
|
||||
return err
|
||||
} else if newVal == nil {
|
||||
out.Amount = nil
|
||||
} else {
|
||||
out.Amount = newVal.(*inf.Dec)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user