errfmt

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: MIT Imports: 1 Imported by: 0 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

View Source
const (
	ExitOK        = 0
	ExitError     = 1
	ExitUsage     = 2
	ExitEmpty     = 3
	ExitAuth      = 4
	ExitNotFound  = 5
	ExitForbidden = 6
	ExitRateLimit = 7
	ExitRetryable = 8
	ExitConfig    = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code    int
	Message string
	Detail  string
}

func Auth

func Auth(msg string) *Error

func Config

func Config(msg string) *Error

func Empty

func Empty() *Error

func Forbidden

func Forbidden(msg string) *Error

func New

func New(code int, msg string) *Error

func NotFound

func NotFound(msg string) *Error

func RateLimit

func RateLimit() *Error

func Usage

func Usage(msg string) *Error

func Wrap

func Wrap(code int, msg string, err error) *Error

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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