Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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 ¶
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 ¶
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.