summaryrefslogtreecommitdiff
path: root/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go')
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go20
1 files changed, 1 insertions, 19 deletions
diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go
index b73b3b141..516d041da 100644
--- a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go
+++ b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go
@@ -29,7 +29,7 @@ import (
// Quantity is a fixed-point representation of a number.
// It provides convenient marshaling/unmarshaling in JSON and YAML,
-// in addition to String() and Int64() accessors.
+// in addition to String() and AsInt64() accessors.
//
// The serialization format is:
//
@@ -726,21 +726,3 @@ func (q *Quantity) SetScaled(value int64, scale Scale) {
q.d.Dec = nil
q.i = int64Amount{value: value, scale: scale}
}
-
-// Copy is a convenience function that makes a deep copy for you. Non-deep
-// copies of quantities share pointers and you will regret that.
-func (q *Quantity) Copy() *Quantity {
- if q.d.Dec == nil {
- return &Quantity{
- s: q.s,
- i: q.i,
- Format: q.Format,
- }
- }
- tmp := &inf.Dec{}
- return &Quantity{
- s: q.s,
- d: infDecAmount{tmp.Set(q.d.Dec)},
- Format: q.Format,
- }
-}