stdio

package
v0.0.0-...-ef38420 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Streams

type Streams struct {
	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer
}

Streams carries process stdio explicitly across package boundaries. Command entrypoints populate it and pass it into package code that needs terminal input or user-visible output.

func New

func New(stdin io.Reader, stdout, stderr io.Writer) Streams

New constructs a generic Streams bundle.

type TerminalInput

type TerminalInput interface {
	io.Reader
	Fd() uintptr
}

TerminalInput is a reader backed by a terminal file descriptor. Password prompts and other terminal interactions need both behaviors.

type TerminalStreams

type TerminalStreams struct {
	Streams
	Terminal TerminalInput
}

TerminalStreams extends Streams with a terminal-backed stdin for operations that need a file descriptor, such as password prompts.

func NewTerminal

func NewTerminal(stdin TerminalInput, stdout, stderr io.Writer) TerminalStreams

NewTerminal constructs a terminal-capable stream bundle.

Jump to

Keyboard shortcuts

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