Documentation ¶
Index ¶
- func IfEmpty[T comparable](v T, defaultValue T) T
- func IfEmptyE[T comparable](v T, whenTrue T, orElse T) T
- func IfNil[T any](v *T, defaultValue T) T
- func IfNilE[T any](v *T, whenTrue T, orElse T) T
- func IfNotEmpty[T comparable](v T, defaultValue T) T
- func IfNotEmptyE[T comparable](v T, whenTrue T, orElse T) T
- func Iif[T1 any](expression bool, whenTrue T1, orElse T1) T1
- func WhenEmpty[T any](v *T, run F)
- func WhenEmptyE[T any](v *T, run F, orElse F)
- func WhenEmptyR1[T any](v *T, run FR1[T], orElse FR1[T]) T
- func WhenError(err error, run F)
- func WhenErrorE(err error, run F, orElse F)
- func WhenNil[T any](v *T, run F)
- func WhenNilE[T any](v *T, run F, orElse F)
- func WhenNilR1[T any](v *T, run FR1[T]) T
- func WhenNilRE1[T any](v *T, run FR1[T], orElse FR1[T]) T
- func WhenNotEmpty[T any](v *T, run F)
- func WhenNotEmptyE[T any](v *T, run F, orElse F)
- func WhenNotEmptyR1[T any](v *T, run FR1[T], orElse FR1[T]) T
- func WhenSliceNotEmpty[T any](items []T, run F)
- func WhenSliceNotEmptyE[T any](items []T, run F, orElse F)
- func WhenSliceNotEmptyR1[IT any, T1 any](items []IT, run FR1[T1], orElse FR1[T1]) T1
- func WhenTrue(expression bool, run F)
- func WhenTrueE(expression bool, run F, orElse F)
- func WhenTrueR1[T any](expression bool, run FR1[T], orElse FR1[T]) T
- func WhenTrueR2[T1 any, T2 any](expression bool, run FR2[T1, T2], orElse FR2[T1, T2]) (T1, T2)
- type DOpt
- type F
- type FR1
- type FR2
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IfEmpty ¶
func IfEmpty[T comparable](v T, defaultValue T) T
func IfEmptyE ¶
func IfEmptyE[T comparable](v T, whenTrue T, orElse T) T
func IfNotEmpty ¶
func IfNotEmpty[T comparable](v T, defaultValue T) T
func IfNotEmptyE ¶
func IfNotEmptyE[T comparable](v T, whenTrue T, orElse T) T
func WhenEmptyE ¶
func WhenEmptyR1 ¶
func WhenErrorE ¶
func WhenNilRE1 ¶
func WhenNotEmpty ¶
func WhenNotEmptyE ¶
func WhenNotEmptyR1 ¶
func WhenSliceNotEmpty ¶
func WhenSliceNotEmptyE ¶
func WhenSliceNotEmptyR1 ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.