read

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IsStdinTerminal = func() bool {
	return term.IsTerminal(int(os.Stdin.Fd()))
}

IsStdinTerminal reports whether stdin is attached to an interactive terminal (TTY), as opposed to a pipe, a file or /dev/null. It is used to know if interactive prompts can be displayed. Note: checking os.ModeCharDevice is not enough since /dev/null (the default stdin in most CI systems) is a character device but not a terminal. It is a variable, so it can be overridden in tests.

Functions

func FromStdin

func FromStdin() (string, error)

func FromStdout

func FromStdout() ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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