Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary nil check in if statement in nodelease controller #85789

Open
wants to merge 1 commit into
base: master
from

Conversation

@ZP-AlwaysWin
Copy link
Contributor

ZP-AlwaysWin commented Dec 2, 2019

What type of PR is this?
Remove unnecessary judgment
/kind cleanup

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

OwnerReferences []OwnerReferencematches 
so nil len(OwnerReferences) ==0 

change:
 if lease.OwnerReferences == nil || len(lease.OwnerReferences) == 0 ==>if len(lease.OwnerReferences) == 0 

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Dec 2, 2019

@ZP-AlwaysWin: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Dec 2, 2019

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ZP-AlwaysWin
To complete the pull request process, please assign random-liu
You can assign the PR to them by writing /assign @random-liu in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ZP-AlwaysWin

This comment has been minimized.

Copy link
Contributor Author

ZP-AlwaysWin commented Dec 2, 2019

/assgin @feiskyer

Copy link
Contributor

mattjmcnaughton left a comment

/lgtm
/release-note-none

Small nit: I think "Remove unnecessary nil check in if statement in nodelease controller` could be a slightly more descriptive pr title.

@k8s-ci-robot k8s-ci-robot added the lgtm label Dec 3, 2019
@ZP-AlwaysWin ZP-AlwaysWin changed the title Optimize:remove unnecessary judgment Remove unnecessary nil check in if statement in nodelease controller Dec 3, 2019
@ZP-AlwaysWin

This comment has been minimized.

Copy link
Contributor Author

ZP-AlwaysWin commented Dec 3, 2019

/lgtm
/release-note-none

Small nit: I think "Remove unnecessary nil check in if statement in nodelease controller` could be a slightly more descriptive pr title.

Thanks,I hava changed pr title.

@ZP-AlwaysWin

This comment has been minimized.

Copy link
Contributor Author

ZP-AlwaysWin commented Dec 3, 2019

/assign @Random-Liu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.