pointer

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2025 License: GPL-3.0 Imports: 0 Imported by: 0

README

Pointer

Package for pointer-based operations.

Inspired by kubernetes/utils/ptr at k8s.io/utils/ptr.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deref

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

Deref dereferences ptr and returns the value it points to if not nil, or else returns a default value (def).

func To

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

To returns a pointer to the given value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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