Skip to content

Conversation

vahnrr
Copy link

@vahnrr vahnrr commented Apr 10, 2025

First of thanks for this library!

While working on math with optional fields generated by go-swagger (e.g. *int) I wrote this EnsureNotNilPtr helper, it's roughly equivalent to this:

ptr = lo.ToPtr(lo.FromPtr(ptr))

If you feel like it belongs here have at it.
I'm not fully convinced by the function's name and documentation though, so I'll welcome any suggestions!

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.

1 participant