exported comment
Vladimir Bauer
9 years ago
| 10 | 10 | // Writer is a buffered the writer that updates the terminal. |
| 11 | 11 | // The contents of writer will be flushed when Flush is called. |
| 12 | 12 | type Writer struct { |
| 13 | // Out is the writer to write to | |
| 14 | 13 | out io.Writer |
| 15 | 14 | |
| 16 | 15 | buf bytes.Buffer |
| 24 | 23 | } |
| 25 | 24 | } |
| 26 | 25 | |
| 26 | // Flush flushes the underlying buffer | |
| 27 | 27 | func (w *Writer) Flush() error { |
| 28 | 28 | // do nothing if buffer is empty |
| 29 | 29 | if len(w.buf.Bytes()) == 0 { |