cli

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run added in v0.1.5

func Run(ctx context.Context, args ...string) int

Types

type CLI added in v0.1.5

type CLI struct {
	Stdout     io.Writer
	Stderr     io.Writer
	Stdin      io.Reader
	Env        envs.Map
	ExtraFiles []*os.File
	// contains filtered or unexported fields
}

func New added in v0.1.5

func New(dir string) *CLI

New CLI

func (*CLI) Dir added in v0.1.5

func (c *CLI) Dir() string

Dir returns the configured directory

func (*CLI) Inject added in v0.1.5

func (c *CLI) Inject(prefix string, files ...*os.File) error

Inject extra files into the command

func (*CLI) Run added in v0.1.5

func (c *CLI) Run(ctx context.Context, args ...string) error

Run the CLI and wait for the command to finish

func (*CLI) Start added in v0.1.5

func (c *CLI) Start(ctx context.Context, args ...string) (cmd *exe.Cmd, err error)

Start the CLI but don't wait for the command to finish. This is typically used for testing purposes.

Directories

Path Synopsis
tool
di
v8

Jump to

Keyboard shortcuts

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