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

Use generic pointer function to make life easier #182

Merged
merged 1 commit into from
May 17, 2023

Conversation

roivaz
Copy link
Member

@roivaz roivaz commented May 17, 2023

Generics are supported in go since 1.18, so taking advantage of this I added a small utility function that can return a pointer of any type. This makes it easier to apply the proper types to the API definitions and drops usage of the "k8s.io/utils/pointer" package.

The function is in pkg/util/pointer/pointer.go, all other code changes are to replace the old per type pointer functions by this one.

/kind feature
/priority important-longterm
/assign

@3scale-robot 3scale-robot added the kind/feature Categorizes issue or PR as related to a new feature. label May 17, 2023
@3scale-robot 3scale-robot added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple sprints to complete. needs-size Indicates a PR or issue lacks a `size/foo` label and requires one. labels May 17, 2023
@roivaz
Copy link
Member Author

roivaz commented May 17, 2023

/ok-to-test

@3scale-robot 3scale-robot added size/L Requires few days to complete the PR or the issue. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-size Indicates a PR or issue lacks a `size/foo` label and requires one. labels May 17, 2023
@3scale-robot 3scale-robot self-assigned this May 17, 2023
@3scale-robot 3scale-robot added the lgtm Indicates that a PR is ready to be merged. label May 17, 2023
@3scale-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: a470855b8f7f6bb019307dd08558c48b9d3a18bf

@slopezz
Copy link
Member

slopezz commented May 17, 2023

/lgtm

@roivaz
Copy link
Member Author

roivaz commented May 17, 2023

/approve

@3scale-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: roivaz

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:

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

@3scale-robot 3scale-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 17, 2023
@3scale-robot 3scale-robot merged commit f46d2bc into main May 17, 2023
@3scale-robot 3scale-robot deleted the feat/generic-pointer-func branch May 17, 2023 13:22
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple sprints to complete. size/L Requires few days to complete the PR or the issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants