terminal

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IOStreams

type IOStreams struct {
	In           io.ReadCloser
	Out          io.Writer
	ErrOut       io.Writer
	ColorEnabled bool
}

IOStreams provides a set of input/output streams for terminal interactions. It encapsulates standard input, output, error output, and a flag indicating whether color output is enabled.

func NewIOStreams

func NewIOStreams(in io.ReadCloser, out, errOut io.Writer, colorEnabled bool) *IOStreams

NewIOStreams creates and returns a new IOStreams instance with the provided input, output, error output streams, and a flag indicating whether color output is enabled.

func NewTestIOStreams

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

NewTestIOStreams creates an IOStreams instance for testing with buffers that can be read and validated. Returns the IOStreams, out buffer, and errOut buffer.

Directories

Path Synopsis
Package input provides interactive user input functionality for the terminal.
Package input provides interactive user input functionality for the terminal.
Package kvx provides integration with the kvx data viewer library for scafctl.
Package kvx provides integration with the kvx data viewer library for scafctl.
Package output provides output formatting utilities for scafctl commands.
Package output provides output formatting utilities for scafctl commands.
Package writer provides a centralized CLI output writer for scafctl.
Package writer provides a centralized CLI output writer for scafctl.

Jump to

Keyboard shortcuts

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