valutil

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: MPL-2.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValOrDefault deprecated

func ValOrDefault[T comparable](val, defaultVal T) T

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

Deprecated: Use `cmp.Or` instead. This function will be removed in a near future version.

func ValOrDefaultFunc

func ValOrDefaultFunc[T comparable](val T, defaultFunc func() T) T

ValOrDefaultFunc returns the given value if it's non-zero, and otherwise invokes defaultFunc to produce a default value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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