diff --git a/internal/ptr/any.go b/internal/ptr/any.go index 3d789b7e..b68afe38 100644 --- a/internal/ptr/any.go +++ b/internal/ptr/any.go @@ -19,6 +19,7 @@ func From[T any](ref *T) (value T) { return } +// FromOrEmpty returns the value or empty value in case the value is nil. func FromOrEmpty[T any](ref *T) (value T) { if ref != nil { value = *ref