errorx

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 2 Imported by: 4

Documentation

Overview

A package to help with errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Empty added in v0.1.8

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 Panic added in v0.1.7

func Panic(err error)

Panic panics with the given error.

func RecoverError added in v0.1.4

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