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

Deprecate old pointer helpers, use generic one #579

Merged

Conversation

bentranter
Copy link
Member

@bentranter bentranter commented Nov 10, 2022

Deprecates and changes all of the uses of the various pointer-to style helpers in favour of using a generic one.

I've seen more and more of the *type struct fields pop up in new features, so I figure this might offer a more consistent way to create a pointer to a type, rather having to use an old type specific one or have users create their own.

Most of this is PR is changing the use of old test helpers to use the new func. The implementation of the new func here.

Deprecates and changes all of the uses of the various pointer-to style
helpers in favour of using a generic one.

I've seen more and more of the `*type` struct fields pop up in new
features, so I figure this might offer a more consistent way to create a
pointer to a type, rather having to use an old type specific one or have
users create their own.
@bentranter bentranter changed the title Deprecate old pointer helps, use generic one Deprecate old pointer helpers, use generic one Nov 10, 2022
Copy link
Contributor

@ChiefMateStarbuck ChiefMateStarbuck left a comment

Choose a reason for hiding this comment

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

Generics for the win 🥇

@bentranter bentranter merged commit ae2e953 into digitalocean:main Nov 14, 2022
@bentranter bentranter deleted the btranter/add-ptr-to-generic-func branch November 14, 2022 19:25
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.

3 participants