Skip to content

Provide a Go 1.26 new() version of ptr.To()#353

Closed
skitt wants to merge 1 commit into
kubernetes:masterfrom
skitt:go-1.26-ptr-new
Closed

Provide a Go 1.26 new() version of ptr.To()#353
skitt wants to merge 1 commit into
kubernetes:masterfrom
skitt:go-1.26-ptr-new

Conversation

@skitt

@skitt skitt commented Jun 16, 2026

Copy link
Copy Markdown
Member

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

This provides a Go 1.26-specific version of ptr.To() delegating to new(). The main purpose of this is to allow Go 1.26 codebases relying on ptr.To() to automatically migrate to new() using go fix.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Release note:

NONE

This allows Go 1.26 codebases relying on ptr.To() to automatically
migrate to new() using go fix.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
@k8s-ci-robot k8s-ci-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Jun 16, 2026
@k8s-ci-robot k8s-ci-robot requested a review from apelisse June 16, 2026 15:24
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: skitt
Once this PR has been reviewed and has the lgtm label, please assign thockin for approval. For more information see the Code Review Process.

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

Details 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

@k8s-ci-robot k8s-ci-robot requested a review from thockin June 16, 2026 15:24
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 16, 2026
@skitt

skitt commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

Ah, this is useless for now, go fix doesn’t support type parameter inference.

@skitt skitt closed this Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants