to

package
v0.0.0-...-ad6f596 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Keys

func Keys[K comparable, V any](m map[K]V) []K

Keys returns a slice of keys from m map.

func Ptr

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

func PtrOrNil

func PtrOrNil[T comparable](t T) *T

PtrOrNil returns a pointer to t if it has a non-empty value otherwise nil.

func ValueOrZero

func ValueOrZero[T any](ptr *T) T

ValueOrZero returns the value that the pointer ptr pointers to. It returns the zero value if ptr is nil.

func Values

func Values[K comparable, V any](m map[K]V) []V

Values returns a slice of values from m map.

Types

This section is empty.

Jump to

Keyboard shortcuts

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