Documentation
¶
Overview ¶
Package cli wires cobra commands to the engine (local mode) or to a running branchd via the REST API (server mode: --server / PGOVERLAY_SERVER). Engine construction is lazy (inside RunE) so --help and tests never touch Docker.
Index ¶
Constants ¶
View Source
const ( ExitError = 1 // ExitDrift: `pgb doctor` computed the plan and found drift. ExitDrift = 1 // ExitDoctorFailed: `pgb doctor` could not compute the plan (branchd // unreachable, bad token, bad flags), so it cannot say whether there is // drift. ExitDoctorFailed = 2 )
Process exit statuses (see ExitCode). Every command exits ExitError on failure, except `pgb doctor`, which separates drift from not knowing.
Variables ¶
This section is empty.
Functions ¶
func ExitCode ¶
ExitCode maps the command that ran and the error it returned (as from cobra's ExecuteC) to the process exit status. Drift is ExitDrift; any other failure is ExitError unless the command sets exitOnErrorAnnotation.
func NewRootCmd ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.