mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-05 11:12:03 +00:00
Remove redundent GetObjectKind() defined on top-level types
TypeMeta is embedded in all these types and TypeMeta has GetObjectKind() method to implement the runtime.Object interface.
This commit is contained in:
@@ -49,6 +49,3 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (obj *Cluster) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *ClusterList) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
|
@@ -51,6 +51,3 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (obj *Cluster) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *ClusterList) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
|
@@ -50,5 +50,3 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (obj *Policy) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
|
@@ -59,7 +59,3 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (obj *LocalSubjectAccessReview) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *SubjectAccessReview) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *SelfSubjectAccessReview) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
|
@@ -59,7 +59,3 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (obj *LocalSubjectAccessReview) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *SubjectAccessReview) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *SelfSubjectAccessReview) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
|
@@ -50,6 +50,3 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (obj *CertificateSigningRequest) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *CertificateSigningRequestList) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
|
@@ -64,6 +64,3 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (obj *CertificateSigningRequest) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *CertificateSigningRequestList) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
|
@@ -51,7 +51,3 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (obj *KubeProxyConfiguration) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *KubeSchedulerConfiguration) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *KubeletConfiguration) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
|
@@ -50,7 +50,3 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (obj *KubeProxyConfiguration) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *KubeSchedulerConfiguration) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *KubeletConfiguration) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
|
@@ -48,5 +48,3 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (obj *Configuration) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
|
@@ -48,5 +48,3 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (obj *Configuration) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
|
@@ -49,5 +49,3 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (obj *Configuration) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
|
@@ -48,5 +48,3 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (obj *Configuration) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
|
@@ -51,5 +51,3 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (obj *Policy) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
|
@@ -54,5 +54,3 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (obj *Policy) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
|
@@ -59,7 +59,3 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (obj *LocalSubjectAccessReview) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *SubjectAccessReview) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *SelfSubjectAccessReview) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
|
@@ -59,7 +59,3 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (obj *LocalSubjectAccessReview) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *SubjectAccessReview) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *SelfSubjectAccessReview) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
|
@@ -50,6 +50,3 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (obj *CertificateSigningRequest) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *CertificateSigningRequestList) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
|
@@ -64,6 +64,3 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (obj *CertificateSigningRequest) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *CertificateSigningRequestList) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
|
||||
|
Reference in New Issue
Block a user