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

pkg/controller/template: get rid of pointer to map #380

Merged
merged 3 commits into from
Feb 5, 2019

Conversation

runcom
Copy link
Member

@runcom runcom commented Feb 5, 2019

Just do this as basic gotchas in Go even if it was a nice hack (maps are pointers anyway so just call a func for readability mainly). Unit tests cover this code path.

The second commit of this PR is just moving floating strings to consts (even if we'll grab those from elsewhere in the future, we avoid having strings around)

The third commit is a usual cleanup

Signed-off-by: Antonio Murdaca runcom@linux.com

@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 5, 2019
Just do this as basic gotchas in Go even if it was a nice hack.

Signed-off-by: Antonio Murdaca <runcom@linux.com>
@runcom runcom force-pushed the no-pointer-map branch 2 times, most recently from f7d46f7 to fa1f8bf Compare February 5, 2019 10:00
Signed-off-by: Antonio Murdaca <runcom@linux.com>
- add comments to exported symbols
- fix golint

Signed-off-by: Antonio Murdaca <runcom@linux.com>
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 5, 2019
@jlebon
Copy link
Member

jlebon commented Feb 5, 2019

This looks good to me! Will let others have a look.
/approve

@cgwalters
Copy link
Member

I'm generally OK with this but one thing we need to keep in mind with general refactoring is that today we don't really have many tests for the MCO in general - see #257. Code LGTM just saying let's be careful 😄

@runcom
Copy link
Member Author

runcom commented Feb 5, 2019

Yeah, I fear regressions at any time here but this code path has unit tests which I've tested they can catch up failures. I generally agree though

@cgwalters
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 5, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cgwalters, jlebon, runcom

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [cgwalters,jlebon,runcom]

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

@openshift-merge-robot openshift-merge-robot merged commit b4ddac1 into openshift:master Feb 5, 2019
@runcom runcom deleted the no-pointer-map branch February 5, 2019 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants