3scale-ops / marin3r

Lightweight, CRD based envoy control plane for kubernetes
Apache License 2.0
56 stars 12 forks source link

Use generic pointer function to make life easier #182

Closed roivaz closed 1 year ago

roivaz commented 1 year ago

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

roivaz commented 1 year ago

/ok-to-test

3scale-robot commented 1 year ago

LGTM label has been added.

Git tree hash: a470855b8f7f6bb019307dd08558c48b9d3a18bf

slopezz commented 1 year ago

/lgtm

roivaz commented 1 year ago

/approve

3scale-robot commented 1 year ago

[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: - ~~[OWNERS](https://github.com/3scale-ops/marin3r/blob/main/OWNERS)~~ [roivaz] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment