term

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTTY

func IsTTY(w io.Writer) bool

IsTTY reports whether w is connected to a character device (typically a terminal). With stdlib-only constraints this approximation cannot distinguish a real terminal from other character devices like /dev/null — that distinction would need a proper ioctl via golang.org/x/term. For our purpose (auto-plain output when piped to a non-terminal), the approximation is sufficient: pipes, files, and buffers — the only writers callers actually wire to non-interactive contexts — all return false correctly.

Types

This section is empty.

Jump to

Keyboard shortcuts

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