errors2

package
Version: v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package errors2 implements methods complementing golang.org/x/xerrors.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPathDoesNotExist = fmt.Errorf("path does not exist")
)

Functions

func CombineErrors

func CombineErrors(primary error, secondary error) (err error)

CombineErrors combines errors if both are not nil, otherwise returns the non-nil one if one exists.

func IsType

func IsType(err error, target any) bool

IsType reports whether any error in err's chain matches target's type.

An error is considered to match a target if it's type is equal to that of the target.

Types

This section is empty.

Jump to

Keyboard shortcuts

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