common

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadCast       = errors.New("cannot cast to type")
	ErrUnsetField    = errors.New("field unset")
	ErrBadField      = errors.New("field does not exist")
	ErrBadFieldType  = errors.New("bad field type")
	ErrBadFieldValue = errors.New("bad field value")
)

Common errors used throughout the code.

View Source
var (
	// Verbose controls log output.
	Verbose bool
)

Functions

func MapKeys

func MapKeys[M ~map[K]V, K comparable, V any](m M) []K

MapKeys returns the keys of the map m. The keys will be in an indeterminate order.

func MapValues

func MapValues[M ~map[K]V, K comparable, V any](m M) []V

MapValues returns the values of the map m. The values will be in an indeterminate order.

Types

This section is empty.

Jump to

Keyboard shortcuts

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