mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Merge pull request #95275 from ProZsolt/golint-pkg-registry-core-replicationcontroller
Fix golint failures in pkg/registry/core/replicationcontroller
This commit is contained in:
commit
c87dd9c512
@ -136,7 +136,6 @@ pkg/registry/core/namespace/storage
|
||||
pkg/registry/core/node
|
||||
pkg/registry/core/persistentvolume
|
||||
pkg/registry/core/persistentvolumeclaim
|
||||
pkg/registry/core/replicationcontroller
|
||||
pkg/registry/core/replicationcontroller/storage
|
||||
pkg/registry/core/rest
|
||||
pkg/registry/core/secret
|
||||
|
@ -14,6 +14,6 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Package controller provides Registry interface and it's RESTStorage
|
||||
// Package replicationcontroller provides Registry interface and it's RESTStorage
|
||||
// implementation for storing ReplicationController api objects.
|
||||
package replicationcontroller // import "k8s.io/kubernetes/pkg/registry/core/replicationcontroller"
|
||||
|
@ -170,7 +170,7 @@ func ControllerToSelectableFields(controller *api.ReplicationController) fields.
|
||||
func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) {
|
||||
rc, ok := obj.(*api.ReplicationController)
|
||||
if !ok {
|
||||
return nil, nil, fmt.Errorf("given object is not a replication controller.")
|
||||
return nil, nil, fmt.Errorf("given object is not a replication controller")
|
||||
}
|
||||
return labels.Set(rc.ObjectMeta.Labels), ControllerToSelectableFields(rc), nil
|
||||
}
|
||||
@ -190,6 +190,7 @@ type rcStatusStrategy struct {
|
||||
rcStrategy
|
||||
}
|
||||
|
||||
// StatusStrategy is the default logic invoked when updating object status.
|
||||
var StatusStrategy = rcStatusStrategy{Strategy}
|
||||
|
||||
func (rcStatusStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) {
|
||||
|
Loading…
Reference in New Issue
Block a user