Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExit = fmt.Errorf("exit")
ErrExit may be passed to CheckError to instruct it to output nothing but exit with status code 1.
Functions ¶
func CheckErr ¶
func CheckErr(err error)
CheckErr prints a user-friendly error to STDERR and exits with a non-zero exit code. Unrecognized errors will be printed with an "error: " prefix.
func DefaultSubCommandRun ¶ added in v0.11.0
DefaultSubCommandRun prints a command's help string to the specified output if no arguments (sub-commands) are provided, or a usage error otherwise.
func RecoverErr ¶
func RecoverErr(err *error)
func RequireNoArguments ¶ added in v0.11.0
RequireNoArguments exits with a usage error if extra arguments are provided.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.