util

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 4 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrForbiddenMethod = errors.New("forbidden method")

ErrForbiddenMethod throws this error when calling a method is prohibited.

View Source
var ErrUnimplementedMethod = errors.New("unimplemented method")

ErrUnimplementedMethod throws this error when calling an unimplemented method.

Functions

func FormatError added in v1.2.2

func FormatError(err error, format string, args ...any) error

FormatError formats an error message and wraps it around the given error.

func OrderedMapKeys added in v1.2.2

func OrderedMapKeys[M ~map[K]V, K cmp.Ordered, V any](m M) []K

OrderedMapKeys returns the sorted keys of a generic map with ordered keys. It is a utility function used to provide deterministic ordering of map keys.

func WrapError added in v1.2.2

func WrapError(err error, format string, args ...any) error

WrapError wraps an existing error, creating a new error with hierarchical relationships.

Types

This section is empty.

Jump to

Keyboard shortcuts

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