Skip to content

Commit

Permalink
Merge pull request #55396 from sttts/sttts-drop-deepcopy-registration
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

deepcopy: remove unused deepcopy func registration

Counterpart to kubernetes/gengo#67.

Kubernetes-commit: 7c8596a95fb37e3c1318e25ae505989122bd4e56
  • Loading branch information
k8s-publish-robot committed Nov 10, 2017
2 parents 05cdcbf + 4b28445 commit ae9cfb4
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 186 deletions.
20 changes: 10 additions & 10 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion _examples/apiserver/apis/example/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// +k8s:deepcopy-gen=package,register
// +k8s:deepcopy-gen=package
// +groupName=example.apiserver.code-generator.k8s.io
package example // import "k8s.io/code-generator/_examples/apiserver/apis/example"
2 changes: 1 addition & 1 deletion _examples/apiserver/apis/example/v1/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// +k8s:deepcopy-gen=package,register
// +k8s:deepcopy-gen=package
// +k8s:conversion-gen=k8s.io/code-generator/_examples/apiserver/apis/example
// +groupName=example.apiserver.code-generator.k8s.io
package v1
27 changes: 0 additions & 27 deletions _examples/apiserver/apis/example/v1/zz_generated.deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,9 @@ limitations under the License.
package v1

import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
)

func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}

// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TestType).DeepCopyInto(out.(*TestType))
return nil
}, InType: reflect.TypeOf(&TestType{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TestTypeList).DeepCopyInto(out.(*TestTypeList))
return nil
}, InType: reflect.TypeOf(&TestTypeList{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TestTypeStatus).DeepCopyInto(out.(*TestTypeStatus))
return nil
}, InType: reflect.TypeOf(&TestTypeStatus{})},
)
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TestType) DeepCopyInto(out *TestType) {
*out = *in
Expand Down
27 changes: 0 additions & 27 deletions _examples/apiserver/apis/example/zz_generated.deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,9 @@ limitations under the License.
package example

import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
)

func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}

// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TestType).DeepCopyInto(out.(*TestType))
return nil
}, InType: reflect.TypeOf(&TestType{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TestTypeList).DeepCopyInto(out.(*TestTypeList))
return nil
}, InType: reflect.TypeOf(&TestTypeList{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TestTypeStatus).DeepCopyInto(out.(*TestTypeStatus))
return nil
}, InType: reflect.TypeOf(&TestTypeStatus{})},
)
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TestType) DeepCopyInto(out *TestType) {
*out = *in
Expand Down
2 changes: 1 addition & 1 deletion _examples/crd/apis/example/v1/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// +k8s:deepcopy-gen=package,register
// +k8s:deepcopy-gen=package
// +groupName=example.crd.code-generator.k8s.io
package v1
27 changes: 0 additions & 27 deletions _examples/crd/apis/example/v1/zz_generated.deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,9 @@ limitations under the License.
package v1

import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
)

func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}

// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TestType).DeepCopyInto(out.(*TestType))
return nil
}, InType: reflect.TypeOf(&TestType{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TestTypeList).DeepCopyInto(out.(*TestTypeList))
return nil
}, InType: reflect.TypeOf(&TestTypeList{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TestTypeStatus).DeepCopyInto(out.(*TestTypeStatus))
return nil
}, InType: reflect.TypeOf(&TestTypeStatus{})},
)
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TestType) DeepCopyInto(out *TestType) {
*out = *in
Expand Down
2 changes: 1 addition & 1 deletion _examples/crd/apis/example2/v1/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// +k8s:deepcopy-gen=package,register
// +k8s:deepcopy-gen=package
// +groupName=example.test2.crd.code-generator.k8s.io
// +groupGoName=SecondExample
package v1
27 changes: 0 additions & 27 deletions _examples/crd/apis/example2/v1/zz_generated.deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,9 @@ limitations under the License.
package v1

import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
)

func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}

// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TestType).DeepCopyInto(out.(*TestType))
return nil
}, InType: reflect.TypeOf(&TestType{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TestTypeList).DeepCopyInto(out.(*TestTypeList))
return nil
}, InType: reflect.TypeOf(&TestTypeList{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TestTypeStatus).DeepCopyInto(out.(*TestTypeStatus))
return nil
}, InType: reflect.TypeOf(&TestTypeStatus{})},
)
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TestType) DeepCopyInto(out *TestType) {
*out = *in
Expand Down
5 changes: 0 additions & 5 deletions cmd/deepcopy-gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ limitations under the License.
// one file, of the form:
// // +k8s:deepcopy-gen=package
//
// Packages can request that the generated DeepCopy functions be registered
// with an `init()` function call to `Scheme.AddGeneratedDeepCopyFuncs()` by
// changing the tag to:
// // +k8s:deepcopy-gen=package,register
//
// DeepCopy functions can be generated for individual types, rather than the
// entire package by specifying a comment on the type definion of the form:
// // +k8s:deepcopy-gen=true
Expand Down
55 changes: 1 addition & 54 deletions vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/k8s.io/gengo/examples/set-gen/generators/sets.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/k8s.io/gengo/examples/set-gen/sets/byte.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/k8s.io/gengo/examples/set-gen/sets/int.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/k8s.io/gengo/examples/set-gen/sets/int64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/k8s.io/gengo/examples/set-gen/sets/string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ae9cfb4

Please sign in to comment.