errorx

package
v0.7.10 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: MIT Imports: 2 Imported by: 2

Documentation

Overview

A package to help with errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Empty

func Empty(err error) bool

Empty returns true if the error is nil.

func Ignore

func Ignore[T any](val T, err error) T

Ignore is a helper function to ignore errors.

func Must

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

Must panics if the error is not nil.

func Nil added in v0.7.10

func Nil[T any](val T) error

Nil is a helper function to return a nil error.

func Panic

func Panic(err error)

Panic panics with the given error.

func RecoverError

func RecoverError(r interface{}) error

RecoverError converts a panic value to an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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