ext

package
v1.27.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Choose

func Choose[T any](expr bool, ift T, iff T) T

Choose implements the missing ternary (?:) operator. When the provided expression evalutes to true, the first result parameter is returned; otherwise the second.

Choose(len(s) == 1, "true", "false")

Types

This section is empty.

Jump to

Keyboard shortcuts

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