Skip to content

Commit cfc3471

Browse files
committed
Fix golint issues in pkg/registry/.../storage
1 parent a258243 commit cfc3471

File tree

14 files changed

+28
-25
lines changed

14 files changed

+28
-25
lines changed

hack/.golint_failures

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -158,27 +158,18 @@ pkg/registry/autoscaling/rest
158158
pkg/registry/batch/job
159159
pkg/registry/batch/rest
160160
pkg/registry/certificates/certificates
161-
pkg/registry/certificates/certificates/storage
162161
pkg/registry/certificates/rest
163162
pkg/registry/coordination/rest
164163
pkg/registry/core/componentstatus
165-
pkg/registry/core/endpoint/storage
166-
pkg/registry/core/event/storage
167-
pkg/registry/core/limitrange/storage
168164
pkg/registry/core/namespace
169165
pkg/registry/core/namespace/storage
170166
pkg/registry/core/node
171-
pkg/registry/core/node/storage
172167
pkg/registry/core/persistentvolume
173-
pkg/registry/core/persistentvolume/storage
174168
pkg/registry/core/persistentvolumeclaim
175-
pkg/registry/core/persistentvolumeclaim/storage
176169
pkg/registry/core/pod
177170
pkg/registry/core/pod/rest
178-
pkg/registry/core/podtemplate/storage
179171
pkg/registry/core/replicationcontroller
180172
pkg/registry/core/replicationcontroller/storage
181-
pkg/registry/core/resourcequota/storage
182173
pkg/registry/core/rest
183174
pkg/registry/core/secret
184175
pkg/registry/core/secret/storage
@@ -194,10 +185,8 @@ pkg/registry/events/rest
194185
pkg/registry/extensions/controller/storage
195186
pkg/registry/extensions/rest
196187
pkg/registry/flowcontrol/rest
197-
pkg/registry/networking/networkpolicy/storage
198188
pkg/registry/networking/rest
199189
pkg/registry/node/rest
200-
pkg/registry/policy/poddisruptionbudget/storage
201190
pkg/registry/policy/rest
202191
pkg/registry/rbac/clusterrole/policybased
203192
pkg/registry/rbac/clusterrolebinding
@@ -210,11 +199,9 @@ pkg/registry/rbac/rolebinding/policybased
210199
pkg/registry/rbac/validation
211200
pkg/registry/registrytest
212201
pkg/registry/scheduling/rest
213-
pkg/registry/settings/podpreset/storage
214202
pkg/registry/settings/rest
215203
pkg/registry/storage/rest
216204
pkg/registry/storage/storageclass
217-
pkg/registry/storage/storageclass/storage
218205
pkg/scheduler/apis/config/v1alpha1
219206
pkg/security/podsecuritypolicy
220207
pkg/security/podsecuritypolicy/group

pkg/registry/certificates/certificates/storage/storage.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ import (
3131
csrregistry "k8s.io/kubernetes/pkg/registry/certificates/certificates"
3232
)
3333

34-
// REST implements a RESTStorage for CertificateSigningRequest
34+
// REST implements a RESTStorage for CertificateSigningRequest.
3535
type REST struct {
3636
*genericregistry.Store
3737
}
3838

39-
// NewREST returns a registry which will store CertificateSigningRequest in the given helper
39+
// NewREST returns a registry which will store CertificateSigningRequest in the given helper.
4040
func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, *StatusREST, *ApprovalREST, error) {
4141
store := &genericregistry.Store{
4242
NewFunc: func() runtime.Object { return &certificates.CertificateSigningRequest{} },
@@ -80,6 +80,7 @@ type StatusREST struct {
8080
store *genericregistry.Store
8181
}
8282

83+
// New creates a new CertificateSigningRequest object.
8384
func (r *StatusREST) New() runtime.Object {
8485
return &certificates.CertificateSigningRequest{}
8586
}
@@ -103,6 +104,7 @@ type ApprovalREST struct {
103104
store *genericregistry.Store
104105
}
105106

107+
// New creates a new CertificateSigningRequest object.
106108
func (r *ApprovalREST) New() runtime.Object {
107109
return &certificates.CertificateSigningRequest{}
108110
}

pkg/registry/core/endpoint/storage/storage.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
"k8s.io/kubernetes/pkg/registry/core/endpoint"
2929
)
3030

31+
// REST implements a RESTStorage for endpoints.
3132
type REST struct {
3233
*genericregistry.Store
3334
}

pkg/registry/core/event/storage/storage.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
"k8s.io/kubernetes/pkg/registry/core/event"
2929
)
3030

31+
// REST implements a RESTStorage for events.
3132
type REST struct {
3233
*genericregistry.Store
3334
}

pkg/registry/core/limitrange/storage/storage.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ import (
2525
"k8s.io/kubernetes/pkg/registry/core/limitrange"
2626
)
2727

28+
// REST implements a RESTStorage for limit ranges.
2829
type REST struct {
2930
*genericregistry.Store
3031
}
3132

32-
// NewREST returns a RESTStorage object that will work against limitranges.
33+
// NewREST returns a RESTStorage object that will work against limit ranges.
3334
func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, error) {
3435
store := &genericregistry.Store{
3536
NewFunc: func() runtime.Object { return &api.LimitRange{} },

pkg/registry/core/node/storage/storage.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"net/http"
2323
"net/url"
2424

25-
"k8s.io/api/core/v1"
25+
v1 "k8s.io/api/core/v1"
2626
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2727
"k8s.io/apimachinery/pkg/runtime"
2828
"k8s.io/apiserver/pkg/registry/generic"
@@ -39,7 +39,7 @@ import (
3939
noderest "k8s.io/kubernetes/pkg/registry/core/node/rest"
4040
)
4141

42-
// NodeStorage includes storage for nodes and all sub resources
42+
// NodeStorage includes storage for nodes and all sub resources.
4343
type NodeStorage struct {
4444
Node *REST
4545
Status *StatusREST
@@ -48,6 +48,7 @@ type NodeStorage struct {
4848
KubeletConnectionInfo client.ConnectionInfoGetter
4949
}
5050

51+
// REST implements a RESTStorage for nodes.
5152
type REST struct {
5253
*genericregistry.Store
5354
connection client.ConnectionInfoGetter
@@ -59,6 +60,7 @@ type StatusREST struct {
5960
store *genericregistry.Store
6061
}
6162

63+
// New creates a new Node object.
6264
func (r *StatusREST) New() runtime.Object {
6365
return &api.Node{}
6466
}

pkg/registry/core/persistentvolume/storage/storage.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import (
3131
"k8s.io/kubernetes/pkg/registry/core/persistentvolume"
3232
)
3333

34+
// REST implements a RESTStorage for persistent volumes.
3435
type REST struct {
3536
*genericregistry.Store
3637
}
@@ -74,6 +75,7 @@ type StatusREST struct {
7475
store *genericregistry.Store
7576
}
7677

78+
// New creates a new PersistentVolume object.
7779
func (r *StatusREST) New() runtime.Object {
7880
return &api.PersistentVolume{}
7981
}

pkg/registry/core/persistentvolumeclaim/storage/storage.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import (
3131
"k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim"
3232
)
3333

34+
// REST implements a RESTStorage for persistent volume claims.
3435
type REST struct {
3536
*genericregistry.Store
3637
}
@@ -74,6 +75,7 @@ type StatusREST struct {
7475
store *genericregistry.Store
7576
}
7677

78+
// New creates a new PersistentVolumeClaim object.
7779
func (r *StatusREST) New() runtime.Object {
7880
return &api.PersistentVolumeClaim{}
7981
}

pkg/registry/core/podtemplate/storage/storage.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
"k8s.io/kubernetes/pkg/registry/core/podtemplate"
2828
)
2929

30+
// REST implements a RESTStorage for pod templates.
3031
type REST struct {
3132
*genericregistry.Store
3233
}

pkg/registry/core/resourcequota/storage/storage.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
"k8s.io/kubernetes/pkg/registry/core/resourcequota"
2929
)
3030

31+
// REST implements a RESTStorage for resource quotas.
3132
type REST struct {
3233
*genericregistry.Store
3334
}
@@ -68,6 +69,7 @@ type StatusREST struct {
6869
store *genericregistry.Store
6970
}
7071

72+
// New creates a new ResourceQuota object.
7173
func (r *StatusREST) New() runtime.Object {
7274
return &api.ResourceQuota{}
7375
}

0 commit comments

Comments
 (0)