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

Clean up: remove redundant value assign in runconfig/parse.go #16279

Merged
merged 1 commit into from
Sep 15, 2015

Conversation

coolljt0725
Copy link
Contributor

Signed-off-by: Lei Jitang leijitang@huawei.com

The temp variable is not necessary during the assign value.
Please correct me if I'm wrong :-)

Signed-off-by: Lei Jitang <leijitang@huawei.com>
@runcom
Copy link
Member

runcom commented Sep 14, 2015

you're not wrong but this is the way the code almost everywhere is currently doing w/o the err variable pre-declared. I personally like it over the changes you've made here :) but this is just my opinion.
some examples:
i.e.: https://github.com/docker/docker/blob/master/api/server/container.go#L107
i.e.: https://github.com/docker/docker/blob/master/api/server/container.go#L183

@tiborvass
Copy link
Contributor

Sorry @runcom I have to disagree :) I prefer this PR, but it's all about different tastes :)

LGTM

@runcom
Copy link
Member

runcom commented Sep 14, 2015

@tiborvass no worry, it's all about different tastes as you said:)

LGTM

@tiborvass
Copy link
Contributor

Thanks @runcom :)

@LK4D4
Copy link
Contributor

LK4D4 commented Sep 14, 2015

I'm against, but whatever :) It reads worse.

runcom added a commit that referenced this pull request Sep 15, 2015
Clean up: remove redundant value assign in runconfig/parse.go
@runcom runcom merged commit 0d873f6 into moby:master Sep 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants