Documentation
¶
Overview ¶
Package ptr offers generic pointer utility functions.
It is implementing the generic ptr functionality from the k8s.io/utils package, because the dependency is not versioned and every upstream commit would cause Dependabot to create a new PR for a version update.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deref ¶
func Deref[T any](ptr *T, def T) T
Deref attempts to dereference a pointer and return the value. If the pointer is nil, the provided default value will be returned instead.
func Equal ¶ added in v0.6.0
func Equal[T comparable](a, b *T) bool
Equal returns true if both arguments are nil or both arguments dereference to the same value.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.