xerrors

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 0 Imported by: 0

README

xerrors

Go Reference MIT License Build Status Code Coverage

Installation

go get github.com/ergosit/xerrors

License

This package is licensed under the terms of the MIT License (see LICENSE file).

Documentation

Overview

Package xerrors extends the errors package from the standard library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Must

func Must(err error)

Must panics if the given error is non-nil. It can wrap a call to a function that returns error.

func Must2 added in v0.3.0

func Must2[T any](value T, err error) T

Must2 returns its first passed argument or panics if the second one is non-nil error. It can wrap a call to a function that returns (T, error).

func Tail added in v0.4.0

func Tail[T any](_ T, err error) error

Tail ignores the first argument and returns the second argument, which is an error. It can wrap a call to a function that returns (T, error).

func Tail2 added in v0.4.0

func Tail2[T1, T2 any](_ T1, _ T2, err error) error

Tail2 ignores the first and second arguments and returns the third argument, which is an error. It can wrap a call to a function that returns (T1, T2, error).

Types

This section is empty.

Jump to

Keyboard shortcuts

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