must_utils

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyToErr

func AnyToErr(v any) error

func Must

func Must[T any](obj T, err error) T

func MustNoReturn

func MustNoReturn(err error)

func MustOk added in v0.2.14

func MustOk[T any](obj T, ok bool) T

func WithRecover added in v0.3.4

func WithRecover(f func(ctx context.Context) error) func(ctx context.Context) error

func WithRecoverAndLog added in v0.3.4

func WithRecoverAndLog(f func(ctx context.Context) error) func(ctx context.Context)

WithRecoverAndLog Decorates function with panic recovering and log for errors.

Types

This section is empty.

Jump to

Keyboard shortcuts

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