clierrors

package
v0.1.72-rc.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 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

Overview

Package clierrors defines the generated CLI's process-exit contract.

Index

Constants

View Source
const (
	ExitOK      = 0
	ExitRuntime = 1
	ExitUsage   = 2
	ExitAuth    = 3
)
View Source
const HelpFooter = "Exit codes: 0 ok · 1 runtime · 2 usage · 3 authentication/authorization"

Variables

This section is empty.

Functions

func CLIReasonExitCode

func CLIReasonExitCode(reason string) int

func ErrorTypeExitCode

func ErrorTypeExitCode(errorType string) int

func ExitCode

func ExitCode(err error) int

func WithExitCode

func WithExitCode(err error, code int) error

Types

type CodedError

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

func (*CodedError) Error

func (e *CodedError) Error() string

func (*CodedError) ExitCode

func (e *CodedError) ExitCode() int

func (*CodedError) Unwrap

func (e *CodedError) Unwrap() error

type ExitCoder

type ExitCoder interface {
	ExitCode() int
}

Jump to

Keyboard shortcuts

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