Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IfElse ¶ added in v0.1.7
type IfElse[T any] struct { // contains filtered or unexported fields }
type SwitchCase ¶ added in v0.1.7
type SwitchCase[T comparable, R any] struct { // contains filtered or unexported fields }
func Switch ¶
func Switch[T comparable, R any](predicate T) *SwitchCase[T, R]
func (*SwitchCase[T, R]) Case ¶ added in v0.1.7
func (s *SwitchCase[T, R]) Case(val T, result R) *SwitchCase[T, R]
func (*SwitchCase[T, R]) CaseF ¶ added in v0.1.7
func (s *SwitchCase[T, R]) CaseF(val T, cb func() R) *SwitchCase[T, R]
func (*SwitchCase[T, R]) Default ¶ added in v0.1.7
func (s *SwitchCase[T, R]) Default(result R) R
func (*SwitchCase[T, R]) DefaultF ¶ added in v0.1.7
func (s *SwitchCase[T, R]) DefaultF(cb func() R) R
Click to show internal directories.
Click to hide internal directories.