Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotAPipe = errors.New("this command should be run in a pipe")
Functions ¶
func IsTerminal ¶
IsTerminal checks if an io.Reader or io.Writer is a TTY.
func JoinErrors ¶
JoinErrors behaves similarly to errors.Join, but returns the error verbatim if there is only 1.
func NewExitCodeError ¶
Types ¶
type ExitCodeError ¶
type ExitCodeError struct {
// contains filtered or unexported fields
}
func (ExitCodeError) Error ¶
func (e ExitCodeError) Error() string
func (ExitCodeError) ExitCode ¶
func (e ExitCodeError) ExitCode() int
type SuppressErrorWriter ¶
type SuppressErrorWriter struct { Error error // contains filtered or unexported fields }
SuppressErrorWriter proxies writes to another writer. If a write returns an error, the error will be suppressed and the writer will be disabled.
func NewSuppressErrorWriter ¶
func NewSuppressErrorWriter(w io.Writer) *SuppressErrorWriter
func (*SuppressErrorWriter) Close ¶
func (w *SuppressErrorWriter) Close() error
func (*SuppressErrorWriter) Reset ¶
func (w *SuppressErrorWriter) Reset()
Click to show internal directories.
Click to hide internal directories.