Help us shape the future of Go! Take the 2026 Go Developer Survey

errorx

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsString

func AsString(err error) string

AsString converts the error into string.

func WithJSON

func WithJSON(err error, v any) error

WithJSON append a JSON string of the value to the error.

func WithValue

func WithValue(err error, v any) error

WithValue append a default format string of the value to the error.

func WithVerbose

func WithVerbose(err error, v any) error

WithVerbose append a verbose format string of the value to the error.

Types

type ExitError

type ExitError struct {
	// contains filtered or unexported fields
}

func WithExitCode

func WithExitCode(err error, code int) *ExitError

func (*ExitError) Code

func (err *ExitError) Code() int

func (*ExitError) Error

func (err *ExitError) Error() string

func (*ExitError) Unwrap

func (err *ExitError) Unwrap() error

Jump to

Keyboard shortcuts

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