Documentation ¶
Index ¶
- func ExecuteCommand(root *cobra.Command, args ...string) (stdout string, stderr string, err error)
- func ExecuteCommandC(root *cobra.Command, args ...string) (c *cobra.Command, stdout string, stderr string, err error)
- func HasSubcommand(t *testing.T, cmd *cobra.Command, name string, msgAndArgs ...interface{}) bool
- func ParsesBoolFlag(t *testing.T, cmd *cobra.Command, flag string, wantValue bool, args []string, ...) bool
- func ParsesStringFlag(t *testing.T, cmd *cobra.Command, flag string, wantValue string, args []string, ...) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteCommand ¶
ExecuteCommand is a test utility function to execute the command with given args and returns the produced output and error as strings.
func ExecuteCommandC ¶
func ExecuteCommandC(root *cobra.Command, args ...string) (c *cobra.Command, stdout string, stderr string, err error)
ExecuteCommandC is a test utility function to execute the command with given args and returns the result command and the produced output and error as strings.
func HasSubcommand ¶
HasSubcommand is an assertion helper that verifies if cobra.Command cmd has a specific child command
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.