errorutil

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSystem

func IsSystem(err error) bool

Whether err comes from the operating system: a path, link, syscall or errno error in the chain, a program that could not be started, or an error that reports itself as not existing, already existing or not permitted

func Kind

func Kind(err error) string

Label the first error in the chain declares through ErrorKind, else the Go type name of the first error that is not a plain errors.New, fmt.Errorf or errors.Join value, "error" when the chain holds only those, "" for nil

Types

type Error

type Error struct{ Kind, Msg string }

Failure carrying a kind label beside its message

func (*Error) Error

func (e *Error) Error() string

The message

func (*Error) ErrorKind

func (e *Error) ErrorKind() string

The kind label

Jump to

Keyboard shortcuts

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