cmd

package
v0.0.0-...-3e65751 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitSuccess  = 0
	ExitError    = 1
	ExitUsage    = 2
	ExitAuth     = 3
	ExitNotFound = 4
	ExitConflict = 5

	// HTTP 4xx range: 10 + (status - 400)
	ExitHTTPBadRequest    = 10
	ExitHTTPUnauthorized  = 11
	ExitHTTPForbidden     = 12
	ExitHTTPUnprocessable = 22

	// HTTP 5xx range: 60 + (status - 500)
	ExitHTTPInternalServer     = 60
	ExitHTTPBadGateway         = 62
	ExitHTTPServiceUnavailable = 63
)

Exit codes following the CI/CD specification.

Variables

This section is empty.

Functions

func ExitCodeFromError

func ExitCodeFromError(err error) int

ExitCodeFromError maps an error to the appropriate exit code.

func HTTPStatusToExitCode

func HTTPStatusToExitCode(status int) int

HTTPStatusToExitCode maps an HTTP status code to a CLI exit code.

func RootCommand

func RootCommand(version string) *ffcli.Command

RootCommand returns the root command tree for the slim aso CLI.

func RootUsageFunc

func RootUsageFunc(c *ffcli.Command) string

RootUsageFunc renders the root help screen.

func Run

func Run(args []string, versionInfo string) int

Run executes the CLI using the provided args and version string. It returns the intended process exit code.

Types

This section is empty.

Jump to

Keyboard shortcuts

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