condexpr

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Any

func Any[T any](expr bool, a, b T) T

Any performs conditional selection on generic types Returns a if expr evaluates to true, otherwise returns b

func Float32

func Float32(expr bool, a, b float32) float32

Float32 performs conditional selection on float32 type Returns a if expr evaluates to true, otherwise returns b

func Float64

func Float64(expr bool, a, b float64) float64

Float64 performs conditional selection on float64 type Returns a if expr evaluates to true, otherwise returns b

func Int

func Int(expr bool, a, b int) int

Int performs conditional selection on int type Returns a if expr evaluates to true, otherwise returns b

func Int8

func Int8(expr bool, a, b int8) int8

Int8 performs conditional selection on int8 type Returns a if expr evaluates to true, otherwise returns b

func Int16

func Int16(expr bool, a, b int16) int16

Int16 performs conditional selection on int16 type Returns a if expr evaluates to true, otherwise returns b

func Int32

func Int32(expr bool, a, b int32) int32

Int32 performs conditional selection on int32 type Returns a if expr evaluates to true, otherwise returns b

func Int64

func Int64(expr bool, a, b int64) int64

Int64 performs conditional selection on int64 type Returns a if expr evaluates to true, otherwise returns b

func Str

func Str(expr bool, a, b string) string

Str performs conditional selection on string type Returns a if expr evaluates to true, otherwise returns b

func Uint

func Uint(expr bool, a, b uint) uint

Uint performs conditional selection on uint type Returns a if expr evaluates to true, otherwise returns b

func Uint8

func Uint8(expr bool, a, b uint8) uint8

Uint8 performs conditional selection on uint8 type Returns a if expr evaluates to true, otherwise returns b

func Uint16

func Uint16(expr bool, a, b uint16) uint16

Uint16 performs conditional selection on uint16 type Returns a if expr evaluates to true, otherwise returns b

func Uint32

func Uint32(expr bool, a, b uint32) uint32

Uint32 performs conditional selection on uint32 type Returns a if expr evaluates to true, otherwise returns b

func Uint64

func Uint64(expr bool, a, b uint64) uint64

Uint64 performs conditional selection on uint64 type Returns a if expr evaluates to true, otherwise returns b

Types

This section is empty.

Jump to

Keyboard shortcuts

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