Codebase list golang-github-vbauerster-mpb / 3b5e8b6
fix golint warning Vladimir Bauer 5 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
77 "strconv"
88 )
99
10 // NotATTY not a TeleTYpewriter error.
11 var NotATTY = errors.New("not a terminal")
10 // ErrNotTTY not a TeleTYpewriter error.
11 var ErrNotTTY = errors.New("not a terminal")
1212
1313 // http://ascii-table.com/ansi-escape-sequences.php
1414 const (
6969 // GetWidth returns width of underlying terminal.
7070 func (w *Writer) GetWidth() (int, error) {
7171 if !w.isTerminal {
72 return -1, NotATTY
72 return -1, ErrNotTTY
7373 }
7474 tw, _, err := GetSize(w.fd)
7575 return tw, err