helper

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2026 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SafeDereference

func SafeDereference[T any](ptr *T) T

SafeDereference return the value ptr points to. If ptr is nil, it returns the default value if the type instead.

func ToNullablePtr added in v0.13.0

func ToNullablePtr[T comparable](val T) *T

ToNullablePtr converts a value to a pointer. If the passed value is the zero value of its type, it returns nil.

func ToPtr

func ToPtr[T any](val T) *T

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL