utils

package
v0.0.0-...-f42d900 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const HardFailPrefix = "hard fail error occurred"

Variables

This section is empty.

Functions

func DecorateHardFailError

func DecorateHardFailError(err error) error

func Filter

func Filter[T any](slice []T, lambda func(t T) bool) []T

func FilterUInt64Slice

func FilterUInt64Slice(slice []uint64, item uint64) []uint64

func Map

func Map[I any, O any](input []I, lambda func(i I) O) []O

func MetricsPanicCallback

func MetricsPanicCallback(err any, ctx sdk.Context, key string)

func PanicHandler

func PanicHandler(recoverCallback func(any)) func()

func Reduce

func Reduce[I, O any](input []I, reducer func(I, O) O, initial O) O

func SliceCopy

func SliceCopy[T any](slice []T) []T

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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