ternary

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: MIT Imports: 0 Imported by: 1 module, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func If

func If[T any](condition bool, positive, negative T) T

func IfElse

func IfElse[T any](condition bool, positive, negative T) T

func IfElseLazy

func IfElseLazy[T any](condition bool, positiveFunc, negativeFunc func() T) T

func IfElseLazy2

func IfElseLazy2[T any, K any](condition bool, positiveFunc, negativeFunc func() (T, K)) (T, K)

func IfElseLazy3

func IfElseLazy3[T any, K any, M any](condition bool, positiveFunc, negativeFunc func() (T, K, M)) (T, K, M)

func IfElseLazyNegative

func IfElseLazyNegative[T any](condition bool, positive T, negativeFunc func() T) T

func IfElseLazyPositive

func IfElseLazyPositive[T any](condition bool, positiveFunc func() T, negative T) T

func IfLazy

func IfLazy[T any](condition bool, positiveFunc, negativeFunc func() T) T

Types

This section is empty.

Jump to

Keyboard shortcuts

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