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

Replace "ifs" with "switch/case" #10625

Merged
merged 1 commit into from
Dec 2, 2016

Conversation

zhaosijun
Copy link

I think code here using "switch/case" like code in "case deployapi.DeploymentStatusPending, deployapi.DeploymentStatusRunning:" maybe be a little more favorable.

@0xmichalis
Copy link
Contributor

LGTM [test]

}
if deployerErr == nil && deployer != nil {

default: /* deployerErr == nil */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lost the deployer != nil check

Copy link
Contributor

@0xmichalis 0xmichalis Aug 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was redundant. It will always be non-nil if deployerErr is nil:

func (c *DeploymentController) getPod(namespace, name string) (*kapi.Pod, error) {

@0xmichalis
Copy link
Contributor

#10635

@zhaosijun
Copy link
Author

@Kargakis PTAL

@0xmichalis
Copy link
Contributor

LGTM, squash down to one commit. We are on a code freeze for the next few weeks so this will get some time to merge.

@0xmichalis 0xmichalis added this to the 1.3.1 milestone Aug 29, 2016
@smarterclayton smarterclayton modified the milestones: 1.3.1, 1.4.0 Sep 19, 2016
@0xmichalis 0xmichalis removed this from the 1.4.0 milestone Sep 26, 2016
@0xmichalis
Copy link
Contributor

@zhaosijun can you update this and drop the merge commits?

@zhaosijun
Copy link
Author

@Kargakis OK. Thank you for reminding me.

@0xmichalis
Copy link
Contributor

LGTM [merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Oct 22, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/11932/) (Image: devenv-rhel7_5466)

@0xmichalis
Copy link
Contributor

flaked on #11094

@0xmichalis
Copy link
Contributor

[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 10f3281

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 10f3281

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/11932/) (Base Commit: 1023112)

@openshift-bot openshift-bot merged commit 79a743f into openshift:master Dec 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants