cli

package
v0.0.0-...-a1e670a Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev" //nolint:gochecknoglobals // set by build ldflags

Version is the current qvm version string. Override at build time: go build -ldflags "-X github.com/trollixx/qvm/internal/cli.Version=1.2.3".

Functions

func NewApp

func NewApp() *cli.Command

NewApp creates and configures the qvm CLI application.

Types

type IOStreams

type IOStreams struct {
	In     io.Reader // for confirm() prompts
	Out    io.Writer // user-facing output
	ErrOut io.Writer // progress/status messages
	// contains filtered or unexported fields
}

IOStreams bundles the three standard I/O streams used by all CLI commands. Inject test-specific buffers via NewTestIOStreams for unit testing.

func NewIOStreams

func NewIOStreams() *IOStreams

NewIOStreams creates an IOStreams wired to the real file descriptors.

func NewTestIOStreams

func NewTestIOStreams() (*IOStreams, *bytes.Buffer, *bytes.Buffer)

NewTestIOStreams returns an IOStreams backed by in-memory buffers. outBuf and errBuf can be inspected after running a command.

func (*IOStreams) NewProgressPrinter

func (s *IOStreams) NewProgressPrinter() *ProgressPrinter

NewProgressPrinter creates a fresh ProgressPrinter writing to s.ErrOut.

type ProgressPrinter

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

ProgressPrinter renders install progress events to stderr. isTTY controls whether cursor-movement escape sequences are used.

Jump to

Keyboard shortcuts

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