exitcodes

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MPL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Success        = 0
	General        = 1
	Usage          = 2
	Authentication = 3
	API            = 4
	Cancelled      = 5
)

Variables

This section is empty.

Functions

func TypeName added in v0.9.0

func TypeName(code int) string

TypeName returns the string error type name for a given exit code. Used when emitting structured JSON error output (--output json).

Types

type CLIError

type CLIError struct {
	Code int
	Err  error
}

CLIError wraps an error with a specific exit code.

func New

func New(code int, err error) *CLIError

func NewAPIError

func NewAPIError(err error) *CLIError

func NewAuthError

func NewAuthError(err error) *CLIError

func NewCancelledError added in v0.5.6

func NewCancelledError(err error) *CLIError

func NewUsageError

func NewUsageError(err error) *CLIError

func (*CLIError) Error

func (e *CLIError) Error() string

func (*CLIError) Unwrap

func (e *CLIError) Unwrap() error

Jump to

Keyboard shortcuts

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