Documentation ¶
Index ¶
- Variables
- func GetRawTTYEncoding() encoding.Encoding
- func GetTTYEncoding() encoding.Encoding
- func GetTTYEncodingName() string
- func MaskIn(in *os.File, enc encoding.Encoding) (*os.File, error)
- func MaskInOutTTY() error
- func MaskOut(out *os.File, enc encoding.Encoding) (*os.File, error)
- func MaskStdoutErr(enc encoding.Encoding) error
Constants ¶
This section is empty.
Variables ¶
View Source
var IsTTY = term.IsTerminal(int(os.Stdout.Fd()))
IsTTY contains whether the stdout is a terminal.
Functions ¶
func GetRawTTYEncoding ¶
GetRawTTYEncoding returns the TTY encoding, or nil if not found.
func GetTTYEncoding ¶
GetTTYEncoding returns the TTY encoding, or UTF-8 if not found.
func GetTTYEncodingName ¶
func GetTTYEncodingName() string
GetTTYEncodingName returns the TTY encoding's name, or empty if not found.
func MaskInOutTTY ¶
func MaskInOutTTY() error
MaskInOutTTY mask os.Stdin, os.Stdout, os.Stderr with the TTY encoding, if any.
WARNING! This uses os pipes, so kernel buffering may cut the tail!
func MaskOut ¶
MaskOut masks the output stream forWrites.
WARNING! This uses os pipes, so kernel buffering may cut the tail!
func MaskStdoutErr ¶
MaskStdoutErr masks os.Stdout and os.Stderr.
WARNING! This uses os pipes, so kernel buffering may cut the tail!
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.