exitcode

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package exitcode defines the CLI's stable exit codes. These are a public contract: scripts depend on them, so values never change.

Index

Constants

View Source
const (
	OK          = 0
	Generic     = 1
	Usage       = 2
	Auth        = 3
	NotFound    = 4
	RateLimited = 5

	// Interrupted follows the shell convention of 128 + SIGINT(2). It is
	// additive: no existing value changes.
	Interrupted = 130
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code int
	Err  error
}

Carries an exit code out of packages that cannot depend on internal/client, so errors raised before any HTTP call don't all collapse to exit 1.

func Wrap

func Wrap(code int, err error) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) ExitCode

func (e *Error) ExitCode() int

func (*Error) Unwrap

func (e *Error) Unwrap() error

Jump to

Keyboard shortcuts

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