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

Add ref.Of/ref.Value leveraging generics #320

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

gu1p
Copy link
Contributor

@gu1p gu1p commented Oct 25, 2024

Instead of using type-specific functions to converting a certain value to its pointer and the pointer to its value, we leverage Golang's generics to do it.

As result, we get a much shorter & powerful API. We are also deprecating the following functions:

  • Str
  • AsStr
  • Bool
  • UInt64
  • Time
  • Float64

We are adding two functions:

  • Of // for creating pointers
  • Value // for getting the value of the giving pointers (or their zero value)

Instead of using type-specific function to converting a certain
value for its pointer and the pointer to its value, we leverage
Golang's generics to do it.

As result, we get a much shorter & powerful API. We are also
deprecating the following functions:
 - Str
 - AsStr
 - Bool
 - UInt64
 - Time
 - Float64

We are adding two functions:
 - Of  // for creating pointers
 - Value // for getting the value of the giving pointers (or their zero value)
@gu1p
Copy link
Contributor Author

gu1p commented Oct 25, 2024

Bunch of non-related issues breaking the pipe 🤡

Copy link

@eric-reis eric-reis merged commit a47d012 into arquivei:master Oct 29, 2024
4 of 6 checks passed
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.

2 participants