Documentation ¶
Overview ¶
Package cli provides utilities for happy command line interfaces.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrCommand = happyx.NewError("command error") // ErrCommandAction = happyx.NewError("command action error") ErrCommandInvalid = errors.New("invalid command definition") ErrCommandArgs = errors.New("command arguments error") ErrCommandFlags = errors.New("command flags error") ErrPanic = errors.New("there was panic, check logs for more info") )
Functions ¶
func AskForConfirmation ¶
AskForConfirmation gets (y/Y)es or (n/N)o from cli input.
func AskForInput ¶
func ExecCommand ¶
ExecCommand wraps ExecCommandRaw to return output as string.
func ExecCommandRaw ¶
ExecCommandRaw wraps and executes provided command and returns its CombinedOutput. It ensures that -x flag is taken into account and Command is Session Context aware.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.