valutil

package
v0.0.0-...-862f905 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FirstNonZero

func FirstNonZero[T constraints.Integer | ~string](values ...T) T

FirstNonZero returns the first argument that is non-zero, or the zero value if all are zero.

func Max

func Max(vars ...int) int

func Min

func Min(vars ...int) int

func ValOrDefault

func ValOrDefault[T constraints.Integer | string](val, defaultVal T) T

ValOrDefault returns the given value if it's non-zero, and otherwise returns the default.

Types

This section is empty.

Jump to

Keyboard shortcuts

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