Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute() error
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
Types ¶
type ExitCodeError ¶ added in v0.45.0
type ExitCodeError struct {
Code int
Err error
// Reported says the command has already explained the failure to the user,
// so main should take the exit code and print nothing more. For a failure
// whose explanation is itself the output — `vinculum man` answering an
// ambiguous topic with the commands that resolve it — a trailing
// "Error: ..." line restates the headline and buries the answer.
Reported bool
}
ExitCodeError carries a specific process exit code out of a command, for callers that distinguish failure modes (`vinculum schema` uses 1 for a validation failure and 2 for a usage or I/O error).
func (*ExitCodeError) Error ¶ added in v0.45.0
func (e *ExitCodeError) Error() string
func (*ExitCodeError) Unwrap ¶ added in v0.45.0
func (e *ExitCodeError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.