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

Rename some variables. #1158

Merged
merged 1 commit into from
Dec 11, 2019
Merged

Rename some variables. #1158

merged 1 commit into from
Dec 11, 2019

Conversation

porridge
Copy link
Member

What this PR does / why we need it:

  • do not use the cryptic 'mans'
  • do not reuse the prereq variable

Copy link
Member

@nfnt nfnt left a comment

Choose a reason for hiding this comment

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

Hooray for better variable names!


if len(opts.Webhooks) != 0 { // right now there's only 0 or 1 webhook, so this is good enough
prereq, err := cmdInit.WebhookManifests(opts.Namespace)
webhooks, err := cmdInit.WebhookManifests(opts.Namespace)
Copy link
Member

Choose a reason for hiding this comment

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

Nit, though it's already better than prereq:

Suggested change
webhooks, err := cmdInit.WebhookManifests(opts.Namespace)
webhookManifests, err := cmdInit.WebhookManifests(opts.Namespace)

Copy link
Contributor

Choose a reason for hiding this comment

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

uf that is almost too long for me :)

Copy link
Contributor

@zen-dog zen-dog Dec 10, 2019

Choose a reason for hiding this comment

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

Waaay too long! Let's just accept the fact that Go has no Getters and Setters and intentionally chooses small variable names, especially in the local scope.

Copy link
Contributor

@alenkacz alenkacz left a comment

Choose a reason for hiding this comment

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

LGTM


if len(opts.Webhooks) != 0 { // right now there's only 0 or 1 webhook, so this is good enough
prereq, err := cmdInit.WebhookManifests(opts.Namespace)
webhooks, err := cmdInit.WebhookManifests(opts.Namespace)
Copy link
Contributor

Choose a reason for hiding this comment

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

uf that is almost too long for me :)

@porridge porridge merged commit 0108c4b into master Dec 11, 2019
@porridge porridge deleted the change-names branch December 11, 2019 09:37
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.

4 participants