pointer

package
v0.0.0-...-d86545f Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deref

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

Deref returns the value the pointer points to. If ptr is nil the function returns zero value

func DerefOr

func DerefOr[T any](ptr *T, def T) T

func NonEmptyOrDefault

func NonEmptyOrDefault[T comparable](t T, def T) T

func To

func To[T any](t T) *T

To returns pointer to the passed value

Types

This section is empty.

Jump to

Keyboard shortcuts

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