Use generated DeepCopy methods.
This commit is contained in:
@@ -27,6 +27,11 @@ import (
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||
)
|
||||
|
||||
// TODO(wojtek-t): As suggested in #8320, we should consider the strategy
|
||||
// to first do the shallow copy and then recurse into things that need a
|
||||
// deep copy (maps, pointers, slices). That sort of copy function would
|
||||
// need one parameter - a pointer to the thing it's supposed to expand,
|
||||
// and it would involve a lot less memory copying.
|
||||
type DeepCopyGenerator interface {
|
||||
// Adds a type to a generator.
|
||||
// If the type is non-struct, it will return an error, otherwise deep-copy
|
||||
|
@@ -21,7 +21,7 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/conversion"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||
)
|
||||
@@ -224,7 +224,7 @@ func TestDeepCopyOfEmbeddedObject(t *testing.T) {
|
||||
}
|
||||
t.Logf("originalRole = %v\n", string(originalData))
|
||||
|
||||
copyOfOriginal, err := conversion.DeepCopy(original)
|
||||
copyOfOriginal, err := api.Scheme.DeepCopy(original)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user