Merge pull request #95275 from ProZsolt/golint-pkg-registry-core-replicationcontroller

Fix golint failures in pkg/registry/core/replicationcontroller
This commit is contained in:
Kubernetes Prow Robot 2020-10-04 03:35:05 -07:00 committed by GitHub
commit c87dd9c512
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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"

View File

@ -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) {