Merge pull request #12556 from uluyol/copynilinterface

Properly handle nil interfaces in DeepCopy.
This commit is contained in:
Piotr Szczesniak
2015-08-12 09:54:02 +02:00
4 changed files with 23 additions and 0 deletions

View File

@@ -32,6 +32,8 @@ 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)
}