kubernetes/pkg/api/resource/deep_copy_generated.go
Clayton Coleman b2a01d4d94
Add an int64 quantity implementation
Provides fast transformations of int64 scaled values with overflow to
inf.Dec as needed. Attempts to reduce allocations and expensive
operations in the critical path.

Alters the public signature of Quantity to encourage more efficient use
2016-05-19 08:41:39 -04:00

48 lines
1.2 KiB
Go

// +build !ignore_autogenerated
/*
Copyright 2016 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
package resource
import (
conversion "k8s.io/kubernetes/pkg/conversion"
)
func DeepCopy_resource_Quantity(in Quantity, out *Quantity, c *conversion.Cloner) error {
if newVal, err := c.DeepCopy(in.i); err != nil {
return err
} else {
out.i = newVal.(int64Amount)
}
if newVal, err := c.DeepCopy(in.d); err != nil {
return err
} else {
out.d = newVal.(infDecAmount)
}
if in.s != nil {
in, out := in.s, &out.s
*out = make([]byte, len(in))
copy(*out, in)
} else {
out.s = nil
}
out.Format = in.Format
return nil
}