Documentation
¶
Index ¶
Constants ¶
const ( RootFlag = "root" HomeFlag = "home" TraceFlag = "trace" OutputFlag = "output" EncodingFlag = "encoding" )
Variables ¶
This section is empty.
Functions ¶
func RunCaptureWithArgs ¶
func RunCaptureWithArgs(cmd Executable, args []string, env map[string]string) (output string, err error)
RunCaptureWithArgs executes the given command with the specified command line args and environmental variables set. It returns whatever was writen to stdout along with any error returned from cmd.Execute()
func RunWithArgs ¶
func RunWithArgs(cmd Executable, args []string, env map[string]string) error
RunWithArgs executes the given command with the specified command line args and environmental variables set. It returns any error returned from cmd.Execute()
Types ¶
type Executable ¶
type Executable interface {
Execute() error
}
Executable is the minimal interface to *corba.Command, so we can wrap if desired before the test
type Executor ¶
type Executor struct {
*cobra.Command
Exit func(int) // this is os.Exit by default, override in tests
}
Executor wraps the cobra Command with a nicer Execute method
func PrepareBaseCmd ¶
PrepareBaseCmd is meant for tendermint and other servers
func PrepareMainCmd ¶
PrepareMainCmd is meant for client side libs that want some more flags
This adds --encoding (hex, btc, base64) and --output (text, json) to the command. These only really make sense in interactive commands.