mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-08 23:03:32 +00:00
Remove unused deep_copies
This commit is contained in:
@@ -2480,11 +2480,7 @@ func DeepCopy_api_Preconditions(in Preconditions, out *Preconditions, c *convers
|
||||
if in.UID != nil {
|
||||
in, out := in.UID, &out.UID
|
||||
*out = new(types.UID)
|
||||
if newVal, err := c.DeepCopy(*in); err != nil {
|
||||
return err
|
||||
} else {
|
||||
**out = newVal.(types.UID)
|
||||
}
|
||||
**out = *in
|
||||
} else {
|
||||
out.UID = nil
|
||||
}
|
||||
|
@@ -1,154 +0,0 @@
|
||||
// +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 meta
|
||||
|
||||
import (
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
conversion "k8s.io/kubernetes/pkg/conversion"
|
||||
runtime "k8s.io/kubernetes/pkg/runtime"
|
||||
)
|
||||
|
||||
func DeepCopy_meta_DefaultRESTMapper(in DefaultRESTMapper, out *DefaultRESTMapper, c *conversion.Cloner) error {
|
||||
if in.defaultGroupVersions != nil {
|
||||
in, out := in.defaultGroupVersions, &out.defaultGroupVersions
|
||||
*out = make([]unversioned.GroupVersion, len(in))
|
||||
for i := range in {
|
||||
if err := unversioned.DeepCopy_unversioned_GroupVersion(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.defaultGroupVersions = nil
|
||||
}
|
||||
if in.resourceToKind != nil {
|
||||
in, out := in.resourceToKind, &out.resourceToKind
|
||||
*out = make(map[unversioned.GroupVersionResource]unversioned.GroupVersionKind)
|
||||
for range in {
|
||||
// FIXME: Copying unassignable keys unsupported unversioned.GroupVersionResource
|
||||
}
|
||||
} else {
|
||||
out.resourceToKind = nil
|
||||
}
|
||||
if in.kindToPluralResource != nil {
|
||||
in, out := in.kindToPluralResource, &out.kindToPluralResource
|
||||
*out = make(map[unversioned.GroupVersionKind]unversioned.GroupVersionResource)
|
||||
for range in {
|
||||
// FIXME: Copying unassignable keys unsupported unversioned.GroupVersionKind
|
||||
}
|
||||
} else {
|
||||
out.kindToPluralResource = nil
|
||||
}
|
||||
if in.kindToScope != nil {
|
||||
in, out := in.kindToScope, &out.kindToScope
|
||||
*out = make(map[unversioned.GroupVersionKind]RESTScope)
|
||||
for range in {
|
||||
// FIXME: Copying unassignable keys unsupported unversioned.GroupVersionKind
|
||||
}
|
||||
} else {
|
||||
out.kindToScope = nil
|
||||
}
|
||||
if in.singularToPlural != nil {
|
||||
in, out := in.singularToPlural, &out.singularToPlural
|
||||
*out = make(map[unversioned.GroupVersionResource]unversioned.GroupVersionResource)
|
||||
for range in {
|
||||
// FIXME: Copying unassignable keys unsupported unversioned.GroupVersionResource
|
||||
}
|
||||
} else {
|
||||
out.singularToPlural = nil
|
||||
}
|
||||
if in.pluralToSingular != nil {
|
||||
in, out := in.pluralToSingular, &out.pluralToSingular
|
||||
*out = make(map[unversioned.GroupVersionResource]unversioned.GroupVersionResource)
|
||||
for range in {
|
||||
// FIXME: Copying unassignable keys unsupported unversioned.GroupVersionResource
|
||||
}
|
||||
} else {
|
||||
out.pluralToSingular = nil
|
||||
}
|
||||
if in.interfacesFunc == nil {
|
||||
out.interfacesFunc = nil
|
||||
} else if newVal, err := c.DeepCopy(in.interfacesFunc); err != nil {
|
||||
return err
|
||||
} else {
|
||||
out.interfacesFunc = newVal.(VersionInterfacesFunc)
|
||||
}
|
||||
if in.aliasToResource != nil {
|
||||
in, out := in.aliasToResource, &out.aliasToResource
|
||||
*out = make(map[string][]string)
|
||||
for key, val := range in {
|
||||
if newVal, err := c.DeepCopy(val); err != nil {
|
||||
return err
|
||||
} else {
|
||||
(*out)[key] = newVal.([]string)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.aliasToResource = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_meta_RESTMapping(in RESTMapping, out *RESTMapping, c *conversion.Cloner) error {
|
||||
out.Resource = in.Resource
|
||||
if err := unversioned.DeepCopy_unversioned_GroupVersionKind(in.GroupVersionKind, &out.GroupVersionKind, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Scope == nil {
|
||||
out.Scope = nil
|
||||
} else if newVal, err := c.DeepCopy(in.Scope); err != nil {
|
||||
return err
|
||||
} else {
|
||||
out.Scope = newVal.(RESTScope)
|
||||
}
|
||||
if in.ObjectConvertor == nil {
|
||||
out.ObjectConvertor = nil
|
||||
} else if newVal, err := c.DeepCopy(in.ObjectConvertor); err != nil {
|
||||
return err
|
||||
} else {
|
||||
out.ObjectConvertor = newVal.(runtime.ObjectConvertor)
|
||||
}
|
||||
if in.MetadataAccessor == nil {
|
||||
out.MetadataAccessor = nil
|
||||
} else if newVal, err := c.DeepCopy(in.MetadataAccessor); err != nil {
|
||||
return err
|
||||
} else {
|
||||
out.MetadataAccessor = newVal.(MetadataAccessor)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_meta_VersionInterfaces(in VersionInterfaces, out *VersionInterfaces, c *conversion.Cloner) error {
|
||||
if in.ObjectConvertor == nil {
|
||||
out.ObjectConvertor = nil
|
||||
} else if newVal, err := c.DeepCopy(in.ObjectConvertor); err != nil {
|
||||
return err
|
||||
} else {
|
||||
out.ObjectConvertor = newVal.(runtime.ObjectConvertor)
|
||||
}
|
||||
if in.MetadataAccessor == nil {
|
||||
out.MetadataAccessor = nil
|
||||
} else if newVal, err := c.DeepCopy(in.MetadataAccessor); err != nil {
|
||||
return err
|
||||
} else {
|
||||
out.MetadataAccessor = newVal.(MetadataAccessor)
|
||||
}
|
||||
return nil
|
||||
}
|
@@ -1,37 +0,0 @@
|
||||
// +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 metatypes
|
||||
|
||||
import (
|
||||
conversion "k8s.io/kubernetes/pkg/conversion"
|
||||
)
|
||||
|
||||
func DeepCopy_metatypes_OwnerReference(in OwnerReference, out *OwnerReference, c *conversion.Cloner) error {
|
||||
out.APIVersion = in.APIVersion
|
||||
out.Kind = in.Kind
|
||||
out.UID = in.UID
|
||||
out.Name = in.Name
|
||||
if in.Controller != nil {
|
||||
value := *in.Controller
|
||||
out.Controller = &value
|
||||
}
|
||||
return nil
|
||||
}
|
@@ -83,6 +83,7 @@ option go_package = "resource";
|
||||
// writing some sort of special handling code in the hopes that that will
|
||||
// cause implementors to also use a fixed point implementation.
|
||||
//
|
||||
// +gencopy=false
|
||||
// +protobuf=true
|
||||
// +protobuf.embed=string
|
||||
// +protobuf.options.marshal=false
|
||||
|
@@ -21,9 +21,8 @@ limitations under the License.
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
conversion "k8s.io/kubernetes/pkg/conversion"
|
||||
time "time"
|
||||
)
|
||||
|
||||
func DeepCopy_unversioned_APIGroup(in APIGroup, out *APIGroup, c *conversion.Cloner) error {
|
||||
|
@@ -2428,11 +2428,7 @@ func DeepCopy_v1_Preconditions(in Preconditions, out *Preconditions, c *conversi
|
||||
if in.UID != nil {
|
||||
in, out := in.UID, &out.UID
|
||||
*out = new(types.UID)
|
||||
if newVal, err := c.DeepCopy(*in); err != nil {
|
||||
return err
|
||||
} else {
|
||||
**out = newVal.(types.UID)
|
||||
}
|
||||
**out = *in
|
||||
} else {
|
||||
out.UID = nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user