Skip to main content

Module app

Module app 

Source
Expand description

The core of the program: the context of a run, the errors and exit codes, and the dispatch of the command. Everything that touches the system (environment, terminal, network, processes) goes through Platform, so the tests can swap in a fake one.

Structs§

Command
For the commands: the options, a command name and a list of options inside a table.
Ctx
A run: the platform, the outputs and the configuration, read only when a command needs it.
Globals
The global options read from the command line.

Enums§

CliError

Constants§

EXIT_API
EXIT_CONNECTION
EXIT_EMPTY
EXIT_FILE
EXIT_TIMEOUT
EXIT_USAGE

Traits§

Platform
What the program asks of the system.

Functions§

run
Runs the program with the arguments (without the binary name) and returns the exit code.