types

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsPointer

func AsPointer[T any](v T) *T

func OrDefault added in v1.3.0

func OrDefault[T any](v *T, def T) T

func ZeroDefault added in v1.10.0

func ZeroDefault[T comparable](v T, def T) T

ZeroDefault returns the default value if the given value is zero, otherwise it returns the value.

Parameters: - v: The value to check. - def: The default value to return if v is zero.

Returns: - The default value if v is zero, otherwise the value.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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