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

Option: Add PointerOrNil #25

Merged
merged 2 commits into from
Sep 25, 2023
Merged

Option: Add PointerOrNil #25

merged 2 commits into from
Sep 25, 2023

Conversation

m110
Copy link

@m110 m110 commented Apr 21, 2023

Hey, thanks for the project!

One thing I missed when working with Option is to convert it to a pointer easily. It's like the opposite of PointerToOption.

It would be useful when converting values for structs used for marshaling. In my case, it's OpenAPI-generated structs with fields like *string, etc.

If you like the idea, I'll add examples and docs.

@ilya-hontarau
Copy link

@samber any updates about this?

@samber
Copy link
Owner

samber commented Sep 25, 2023

Sorry for the late review.

Let's merge ;)

I will update the doc and playground demo.

@samber samber marked this pull request as ready for review September 25, 2023 13:21
@samber samber merged commit fe4bf1d into samber:master Sep 25, 2023
2 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.

3 participants