mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
fix some golint failures of pkg/registry
This commit is contained in:
parent
88f8c785b4
commit
213d07af8d
@ -195,10 +195,7 @@ pkg/proxy/userspace
|
||||
pkg/proxy/winkernel
|
||||
pkg/proxy/winuserspace
|
||||
pkg/quota/v1/evaluator/core
|
||||
pkg/registry/admissionregistration/mutatingwebhookconfiguration/storage
|
||||
pkg/registry/admissionregistration/rest
|
||||
pkg/registry/admissionregistration/validatingwebhookconfiguration/storage
|
||||
pkg/registry/apps/daemonset/storage
|
||||
pkg/registry/apps/deployment/storage
|
||||
pkg/registry/apps/replicaset
|
||||
pkg/registry/apps/replicaset/storage
|
||||
@ -211,11 +208,8 @@ pkg/registry/authorization/localsubjectaccessreview
|
||||
pkg/registry/authorization/rest
|
||||
pkg/registry/authorization/selfsubjectaccessreview
|
||||
pkg/registry/authorization/subjectaccessreview
|
||||
pkg/registry/autoscaling/horizontalpodautoscaler/storage
|
||||
pkg/registry/autoscaling/rest
|
||||
pkg/registry/batch/cronjob/storage
|
||||
pkg/registry/batch/job
|
||||
pkg/registry/batch/job/storage
|
||||
pkg/registry/batch/rest
|
||||
pkg/registry/certificates/certificates
|
||||
pkg/registry/certificates/certificates/storage
|
||||
|
@ -24,7 +24,7 @@ import (
|
||||
"k8s.io/kubernetes/pkg/registry/admissionregistration/mutatingwebhookconfiguration"
|
||||
)
|
||||
|
||||
// rest implements a RESTStorage for pod disruption budgets against etcd
|
||||
// REST implements a RESTStorage for pod disruption budgets against etcd
|
||||
type REST struct {
|
||||
*genericregistry.Store
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ import (
|
||||
"k8s.io/kubernetes/pkg/registry/admissionregistration/validatingwebhookconfiguration"
|
||||
)
|
||||
|
||||
// rest implements a RESTStorage for pod disruption budgets against etcd
|
||||
// REST implements a RESTStorage for pod disruption budgets against etcd
|
||||
type REST struct {
|
||||
*genericregistry.Store
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ import (
|
||||
"k8s.io/kubernetes/pkg/registry/apps/daemonset"
|
||||
)
|
||||
|
||||
// rest implements a RESTStorage for DaemonSets
|
||||
// REST implements a RESTStorage for DaemonSets
|
||||
type REST struct {
|
||||
*genericregistry.Store
|
||||
categories []string
|
||||
@ -76,6 +76,7 @@ func (r *REST) Categories() []string {
|
||||
return r.categories
|
||||
}
|
||||
|
||||
// WithCategories sets categories for REST.
|
||||
func (r *REST) WithCategories(categories []string) *REST {
|
||||
r.categories = categories
|
||||
return r
|
||||
@ -86,6 +87,7 @@ type StatusREST struct {
|
||||
store *genericregistry.Store
|
||||
}
|
||||
|
||||
// New creates a new DaemonSet object.
|
||||
func (r *StatusREST) New() runtime.Object {
|
||||
return &apps.DaemonSet{}
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ import (
|
||||
"k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler"
|
||||
)
|
||||
|
||||
// REST implements a RESTStorage for pod disruption budgets against etcd
|
||||
type REST struct {
|
||||
*genericregistry.Store
|
||||
}
|
||||
@ -74,11 +75,12 @@ func (r *REST) Categories() []string {
|
||||
return []string{"all"}
|
||||
}
|
||||
|
||||
/// StatusREST implements the REST endpoint for changing the status of a daemonset
|
||||
// StatusREST implements the REST endpoint for changing the status of a daemonset
|
||||
type StatusREST struct {
|
||||
store *genericregistry.Store
|
||||
}
|
||||
|
||||
// New creates a new HorizontalPodAutoscaler object.
|
||||
func (r *StatusREST) New() runtime.Object {
|
||||
return &autoscaling.HorizontalPodAutoscaler{}
|
||||
}
|
||||
|
@ -78,6 +78,7 @@ type StatusREST struct {
|
||||
store *genericregistry.Store
|
||||
}
|
||||
|
||||
// New creates a new CronJob object.
|
||||
func (r *StatusREST) New() runtime.Object {
|
||||
return &batch.CronJob{}
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ type JobStorage struct {
|
||||
Status *StatusREST
|
||||
}
|
||||
|
||||
// NewStorage creates a new JobStorage against etcd.
|
||||
func NewStorage(optsGetter generic.RESTOptionsGetter) JobStorage {
|
||||
jobRest, jobStatusRest := NewREST(optsGetter)
|
||||
|
||||
@ -89,6 +90,7 @@ type StatusREST struct {
|
||||
store *genericregistry.Store
|
||||
}
|
||||
|
||||
// New creates a new Job object.
|
||||
func (r *StatusREST) New() runtime.Object {
|
||||
return &batch.Job{}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user