cmd

package
Version: v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//ExSuccess is the exit code that signals that everything went as expected
	ExSuccess = 0
	//ExUsage is the exit code that signals that the application was not started with the correct arguments
	ExUsage = 64
	//ExUnavailable is the exit code that signals that the application failed to perform the intended task
	ExUnavailable = 69
	//ExConfig is the exit code that signals that the task failed due to a configuration error
	ExConfig = 78
)

Variables

View Source
var Success = Result{}

Success is the empty Result that is used whenever the command ran successfully

Functions

This section is empty.

Types

type Result added in v0.5.0

type Result struct {
	ExitCode int
	Message  string
}

Result contains the final exit message and code for a CLI session

func ConfigurationError added in v0.5.0

func ConfigurationError(message string) Result

ConfigurationError returns a Result with the exit code ExConfig

func InvalidUsage added in v0.5.0

func InvalidUsage(message string) Result

InvalidUsage returns a Result with the exit code ExUsage

func TaskUnavailable added in v0.5.0

func TaskUnavailable(message string) Result

TaskUnavailable returns a Result with the exit code ExUnavailable

func (Result) Error added in v0.5.0

func (e Result) Error() string

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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