Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StringUnspecified = "\x00unspecified"
Functions ¶
func TakeOrElse ¶
func TakeOrElse[T comparable](a, b, unspecified T) T
unspecified is the sentinel value
func TakeOrElsePointer ¶
func TakeOrElsePointer[T any](a, b, unspecified *T) *T
golang interface or pointer receiver
func TakeOrElseString ¶
func TakeOrElseValue ¶
func TakeOrElseValue[T interface{ IsSpecified() bool }](a, b T) T
Generic TakeOrElse for any type with IsSpecified() method golang interface or value receiver DO NOT PASS NIL as arguments
Types ¶
Click to show internal directories.
Click to hide internal directories.