Fix golint failures in pkg/registry/core/replicationcontroller

This commit is contained in:
Zsolt Prontvai 2020-10-03 12:56:14 +01:00
parent 3005b6d767
commit c244e175e2
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) {