diff --git a/cwriter/writer.go b/cwriter/writer.go index 6f57875..ee68312 100644 --- a/cwriter/writer.go +++ b/cwriter/writer.go @@ -8,8 +8,8 @@ "strconv" ) -// NotATTY not a TeleTYpewriter error. -var NotATTY = errors.New("not a terminal") +// ErrNotTTY not a TeleTYpewriter error. +var ErrNotTTY = errors.New("not a terminal") // http://ascii-table.com/ansi-escape-sequences.php const ( @@ -70,7 +70,7 @@ // GetWidth returns width of underlying terminal. func (w *Writer) GetWidth() (int, error) { if !w.isTerminal { - return -1, NotATTY + return -1, ErrNotTTY } tw, _, err := GetSize(w.fd) return tw, err