nils

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CastOrNil added in v0.6.1

func CastOrNil[T any](value any) T

func Coalesce added in v0.6.1

func Coalesce[T any](values ...*T) T

Coalesce Returns first no-nil value or panic if none

func Copy added in v0.6.1

func Copy[T any](value *T) *T

func IsNil

func IsNil[T any](t *T) bool

func IsNotNil

func IsNotNil[T any](t *T) bool

func OrDefault added in v0.6.1

func OrDefault[T any](value *T, defaultValue T) T

OrDefault Return value if no nil of default value in the other case

Types

This section is empty.

Jump to

Keyboard shortcuts

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