Documentation ¶
Overview ¶
Package ptr contains some utility methods related to pointers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NilOrEmpty ¶
NilOrEmpty returns true if s is nil or the empty string.
func NilToDefault ¶ added in v0.23.1
func NilToDefault[T any](s *T, def T) T
NilToDefault coalesces a nil value to the provided default value.
func NilToEmpty ¶ added in v0.7.2
func NilToEmpty[T any](s *T) T
NilToEmpty coalesces a nil value to the empty value.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.