rules

package
v0.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

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 IfNil

func IfNil[T any](v *T, defaultValue T) T

func IfNilE

func IfNilE[T any](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 Iif

func Iif[T1 any](expression bool, whenTrue T1, orElse T1) T1

func WhenEmpty

func WhenEmpty[T any](v *T, run F)

func WhenEmptyE

func WhenEmptyE[T any](v *T, run F, orElse F)

func WhenEmptyR1

func WhenEmptyR1[T any](v *T, run FR1[T], orElse FR1[T]) T

func WhenError

func WhenError(err error, run F)

func WhenErrorE

func WhenErrorE(err error, run F, orElse F)

func WhenNil

func WhenNil[T any](v *T, run F)

func WhenNilE

func WhenNilE[T any](v *T, run F, orElse F)

func WhenNilR1

func WhenNilR1[T any](v *T, run FR1[T]) T

func WhenNilRE1

func WhenNilRE1[T any](v *T, run FR1[T], orElse FR1[T]) T

func WhenNotEmpty

func WhenNotEmpty[T any](v *T, run F)

func WhenNotEmptyE

func WhenNotEmptyE[T any](v *T, run F, orElse F)

func WhenNotEmptyR1

func WhenNotEmptyR1[T any](v *T, run FR1[T], orElse FR1[T]) T

func WhenSliceNotEmpty

func WhenSliceNotEmpty[T any](items []T, run F)

func WhenSliceNotEmptyE

func WhenSliceNotEmptyE[T any](items []T, run F, orElse F)

func WhenSliceNotEmptyR1

func WhenSliceNotEmptyR1[IT any, T1 any](items []IT, run FR1[T1], orElse FR1[T1]) T1

func WhenTrue

func WhenTrue(expression bool, run F)

func WhenTrueE

func WhenTrueE(expression bool, run F, orElse F)

func WhenTrueR1

func WhenTrueR1[T any](expression bool, run FR1[T], orElse FR1[T]) T

func WhenTrueR2

func WhenTrueR2[T1 any, T2 any](expression bool, run FR2[T1, T2], orElse FR2[T1, T2]) (T1, T2)

Types

type DOpt

type DOpt interface {
}

type F

type F func()

type FR1

type FR1[T any] func() T

type FR2

type FR2[T1 any, T2 any] func() (T1, T2)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL