use

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package use provides conditional expression builders

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UseIf

type UseIf[T any] struct {
	Tru       T
	Condition bool
}

UseIf is if...else expression builder

func If

func If[T any](tru T, condition bool) UseIf[T]

If builds useIf(tr, condition).Else(fals) expression builder

func (UseIf[T]) Else

func (u UseIf[T]) Else(fals T) T

Else returns the tru or the fals according to the condition

Jump to

Keyboard shortcuts

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