cli

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferedOutput

type BufferedOutput struct {
	Error error

	Out bytes.Buffer
	Err bytes.Buffer
}

type CommandlineTool

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

func NewCLI

func NewCLI(binPath string) *CommandlineTool

func NewCLIWithLogger

func NewCLIWithLogger(binPath string, logger *pterm.Logger) *CommandlineTool

func (*CommandlineTool) Check

func (cli *CommandlineTool) Check() error

func (*CommandlineTool) Run

func (cli *CommandlineTool) Run(command ...string) (string, error)

func (*CommandlineTool) RunWithContext

func (cli *CommandlineTool) RunWithContext(context context.Context, command ...string) *BufferedOutput

type ICommandLineTool

type ICommandLineTool interface {
	Check() error

	Run(command ...string) (string, error)
	RunWithContext(context context.Context, command ...string) *BufferedOutput
}

Jump to

Keyboard shortcuts

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