Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Or ¶
func Or[T comparable](a, b T) T
Or acts like "||" for values in any other language. Unfortunately, in Go this operator only works for conditions. Please note, this operator is just a function and not prevents execution.
Usage:
zen.Or(0, 1) // 1
func Tr ¶
func Tr[T comparable](condition bool, v1, v2 T) T
Tr acts like a ternary operator in other languages. Unfortunately, Go doesn't have this operator. Please note, this operator is just a function and not prevents execution.
Usage:
zen.Tr(false, "asd", "qwe") // string{"qwe"}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.