Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct {
Error string `json:"error,omitempty"` // hand written error message
Details string `json:"error_details,omitempty"` // underlying error message
ErrorCode string `json:"code,omitempty"` // machine-keyable error code
Success string `json:"success,omitempty"` // hand written success message
Serializable any `json:"-"` // wholesale output if mode is JSON
ExitStatus uint8 `json:"-"` // process exit status code. keeping hidden since it's not always present
SuccessMultiline bool `json:"-"` // success message is multi-line, disable automatic colors
ErrorMultiline bool `json:"-"` // error message is multi-line, disable automatic colors
}
Returned by command functions
func NewErrorWithDetails ¶
func NewSerializable ¶
func NewSuccess ¶
func (*Response) AddErrorLn ¶
func (*Response) AddSuccessLn ¶
func (*Response) SetErrorDetails ¶
Click to show internal directories.
Click to hide internal directories.