command

package
v1.4.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package command provides functions to invoke tanzu cli commands

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunTanzuCommand

func RunTanzuCommand(args []string, cmdOpts ...CommandOptions) (bytes.Buffer, bytes.Buffer, error)

RunTanzuCommand invokes a Tanzu CLI command

Types

type CmdOptions

type CmdOptions struct {
	// contains filtered or unexported fields
}

CmdOptions specifies the command options

type CommandOptions

type CommandOptions func(o *CmdOptions)

func WithErrorWriter

func WithErrorWriter(errWriter io.Writer) CommandOptions

WithErrorWriter specifies the CommandOption for configuring Stderr

func WithNoStderr

func WithNoStderr() CommandOptions

WithNoStderr specifies to ignore stderr

func WithNoStdout

func WithNoStdout() CommandOptions

WithNoStdout specifies to ignore stdout

func WithOutputWriter

func WithOutputWriter(outWriter io.Writer) CommandOptions

WithOutputWriter specifies the CommandOption for configuring Stdout

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL