Documentation
¶
Index ¶
- func AnyNonZero[T comparable](vals ...T) bool
- func Convert[T any](value any) (T, error)
- func ConvertSlice[T any](value any) ([]T, error)
- func ConvertToNonZero[T comparable](value any) (T, error)
- func GetContextValue[T any](ctx context.Context, key any) (T, error)
- func GetNonZeroContextValue[T comparable](ctx context.Context, key any) (T, error)
- func IsNil(value any) bool
- func MapGet[T comparable, U any](m map[T]U, key T) (U, error)
- func MapGetConvert[U any, T comparable](m map[T]any, key T) (U, error)
- func MapGetConvertNonZero[U comparable, T comparable](m map[T]any, key T) (U, error)
- func MapGetConvertSlice[U any, T comparable](m map[T]any, key T) ([]U, error)
- func MapGetNonZero[T comparable, U comparable](m map[T]U, key T) (U, error)
- func Must(err error, label string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyNonZero ¶
func AnyNonZero[T comparable](vals ...T) bool
func ConvertSlice ¶
func ConvertToNonZero ¶
func ConvertToNonZero[T comparable](value any) (T, error)
func GetNonZeroContextValue ¶
func GetNonZeroContextValue[T comparable](ctx context.Context, key any) (T, error)
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)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.