utils

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 8 Imported by: 34

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyNonZero

func AnyNonZero[T comparable](vals ...T) bool

func Convert

func Convert[T any](value any) (T, error)

func ConvertSlice

func ConvertSlice[T any](value any) ([]T, error)

func ConvertToNonZero

func ConvertToNonZero[T comparable](value any) (T, error)

func GetContextValue

func GetContextValue[T any](ctx context.Context, key any) (T, error)

func GetNonZeroContextValue

func GetNonZeroContextValue[T comparable](ctx context.Context, key any) (T, error)

func IsNil

func IsNil(value any) bool

func MapGet

func MapGet[T comparable, U any](m map[T]U, key T) (U, error)

func MapGetConvert

func MapGetConvert[U any, T comparable](m map[T]any, key T) (U, error)

func MapGetConvertNonZero

func MapGetConvertNonZero[U comparable, T comparable](m map[T]any, key T) (U, error)

func MapGetConvertSlice

func MapGetConvertSlice[U any, T comparable](m map[T]any, key T) ([]U, error)

func MapGetNonZero

func MapGetNonZero[T comparable, U comparable](m map[T]U, key T) (U, error)

func Must

func Must(err error, label string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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