internal

package
v0.0.0-...-f066c3e Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	// Err is the actual error that occurred.
	Err error `json:"error,omitempty"`

	// Prefix is the prefix to be prepended to the error message.
	Prefix string `json:"prefix,omitempty"`

	// Origin is the origin of the error. This is usually the name of the
	// process that caused the error.
	Origin string `json:"origin,omitempty"`

	// Message is a detailed description of the error. It gives the user a
	// deeper insight into the problem.
	Message string `json:"message,omitempty"`

	// Suggestions is a slice of suggestions that can be used to fix the
	// error.
	Suggestions []string `json:"suggestions,omitempty"`
}

Error is a custom error type that can be used to return a more descriptive error to the user.

func (*Error) Error

func (err *Error) Error() string

Error returns err.Err's message prefixed with err.Prefix and err.Origin.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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