Documentation ¶
Index ¶
- func ExitOnErrorWithMessage(exitcode exitcode.Enum, msg string) error
- func ExitOnInvalidArgument(msg string) error
- func ExitOnInvalidOption(msg string) error
- func ExitOnNotFound(msg string) error
- func ExitOnRPC(msg string) error
- func FailureResponse(err error) error
- func SuccessResponse(result interface{}) error
- func UserConfirmed(msg string) bool
- type PipeBridge
- type PipeBridgeController
- type Printer
- type StderrBridge
- type StdoutBridge
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExitOnErrorWithMessage ¶
ExitOnErrorWithMessage informs cli to exit with message and error code
Types ¶
type PipeBridgeController ¶
type PipeBridgeController struct {
// contains filtered or unexported fields
}
PipeBridgeController is the controller of the bridges of pipe
func NewPipeBridgeController ¶
func NewPipeBridgeController(bridges ...PipeBridge) (*PipeBridgeController, fail.Error)
NewPipeBridgeController creates a new controller of bridges of pipe
func (*PipeBridgeController) Start ¶
func (pbc *PipeBridgeController) Start(ctx context.Context) fail.Error
Start initiates the capture of pipe outputs and the display of what is captured
func (*PipeBridgeController) Stop ¶
func (pbc *PipeBridgeController) Stop() fail.Error
Stop the captures and the display.
func (*PipeBridgeController) Wait ¶
func (pbc *PipeBridgeController) Wait() fail.Error
Wait waits the end of the goroutines
type StderrBridge ¶
type StderrBridge struct {
// contains filtered or unexported fields
}
StderrBridge is a OutputPipe outputting on stderr
func NewStderrBridge ¶
func NewStderrBridge(pipe io.ReadCloser) (*StderrBridge, fail.Error)
NewStderrBridge creates a pipe displaying on stderr
func (*StderrBridge) Print ¶
func (errp *StderrBridge) Print(data interface{})
Print outputs the string to stderr
func (StderrBridge) Reader ¶
func (cb StderrBridge) Reader() io.ReadCloser
type StdoutBridge ¶
type StdoutBridge struct {
// contains filtered or unexported fields
}
StdoutBridge is a PipeBridge outputting on stdout
func NewStdoutBridge ¶
func NewStdoutBridge(pipe io.ReadCloser) (*StdoutBridge, fail.Error)
NewStdoutBridge creates an PipeBridge from a bufio.ReadCloser
func (*StdoutBridge) Print ¶
func (outp *StdoutBridge) Print(data interface{})
Print outputs the string to stdout
func (StdoutBridge) Reader ¶
func (cb StdoutBridge) Reader() io.ReadCloser
Click to show internal directories.
Click to hide internal directories.