Discover Packages
github.com/bww/go-util
v1
ext
package
Version:
v1.27.0
Opens a new window with list of versions in this module.
Published: Sep 1, 2023
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 5
Opens a new window with list of known importers.
Documentation
Documentation
¶
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")
Source Files
¶
Click to show internal directories.
Click to hide internal directories.