# Functions
Fatal outputs the errorMsg and exits with status exitCode.
FatalError outputs the error and exits with status exitCode.
FatalResult outputs the result and exits with status exitCode.
GetFormat returns the output format currently set.
ParseOutputFormat parses a string and returns the corresponding OutputFormat.
PrintResult is a convenient wrapper to provide feedback for complex data, where the contents can't be just serialized to JSON but requires more structure.
SetFormat can be used to change the output format at runtime.
# Constants
ErrBadArgument is returned when the arguments are not valid (7).
ErrCoreConfig represents an error in the cli core config, for example some basic files shipped with the installation are missing, or cannot create or get basic directories vital for the CLI to work.
ErrGeneric Generic error (1 is the reserved "catchall" code in Unix).
ErrNetwork is returned when a network error occurs (5).
ErrNoConfigFile is returned when the config file is not found (3).
JSON format.
Success (0 is the no-error return code in Unix).
Text is the plain text format, suitable for interactive terminals.
# Interfaces
ErrorResult is a result embedding also an error.
Result is anything more complex than a sentence that needs to be printed for the user.