Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAborted = errors.New("operation aborted")
Functions ¶
This section is empty.
Types ¶
type CliError ¶
type CliError struct { // The original error that triggers this CLI error. // The Err.String() will be print in red to the user. Err error // Message allow to override the red message shown to the use. // By default, we will use Err.String() but in same case you may want to keep Err // to avoid loosing detail in json output. Message string Details string Hint string // Code allows to return a specific error code from the main binary. Code int // Empty tells the marshaler to not print any message for the error Empty bool }
CliError is an all-in-one error structure that can be used in commands to return useful errors to the user. CliError implements JSON and human marshaler for a smooth experience.
func ParseCloudErr ¶
TODO: It's not CLI work. SDK should do it.
func (*CliError) MarshalHuman ¶
func (*CliError) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.