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

feat: Use generics to get pointers to types #219

Merged
merged 1 commit into from
Dec 20, 2022

Commits on Dec 20, 2022

  1. feat: Use generics to get pointers to types

    Since the minimum required Go version is 1.18 according to go.mod we can
    use generics to have a single function that can return a pointer to any
    type. This avoids the need to add more $Type helpers in the future.
    
    The new Ptr function is introduced and exsiting functions are updated to
    call through Ptr instead. Any exported functions are now marked as
    deprecated but not removed in order to avoid breaking backwards
    compatibility. All non-exported functions are removed. All call sites
    are updated to use Ptr directly.
    daenney committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    cfaa846 View commit details
    Browse the repository at this point in the history