diff options
Diffstat (limited to 'vendor/github.com/vbauerster/mpb/cwriter')
-rw-r--r-- | vendor/github.com/vbauerster/mpb/cwriter/writer.go | 8 | ||||
-rw-r--r-- | vendor/github.com/vbauerster/mpb/cwriter/writer_windows.go | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/vendor/github.com/vbauerster/mpb/cwriter/writer.go b/vendor/github.com/vbauerster/mpb/cwriter/writer.go index 0b1470d4c..638237c18 100644 --- a/vendor/github.com/vbauerster/mpb/cwriter/writer.go +++ b/vendor/github.com/vbauerster/mpb/cwriter/writer.go @@ -22,8 +22,8 @@ var ( clearCursorAndLine = cursorUp + clearLine ) -// Writer is a buffered the writer that updates the terminal. -// The contents of writer will be flushed when Flush is called. +// Writer is a buffered the writer that updates the terminal. The +// contents of writer will be flushed when Flush is called. type Writer struct { out io.Writer buf bytes.Buffer @@ -64,11 +64,13 @@ func (w *Writer) WriteString(s string) (n int, err error) { return w.buf.WriteString(s) } -// ReadFrom reads from the provided io.Reader and writes to the underlying buffer. +// ReadFrom reads from the provided io.Reader and writes to the +// underlying buffer. func (w *Writer) ReadFrom(r io.Reader) (n int64, err error) { return w.buf.ReadFrom(r) } +// GetWidth returns width of underlying terminal. func (w *Writer) GetWidth() (int, error) { if w.isTerminal { tw, _, err := terminal.GetSize(w.fd) diff --git a/vendor/github.com/vbauerster/mpb/cwriter/writer_windows.go b/vendor/github.com/vbauerster/mpb/cwriter/writer_windows.go index dad7f50b2..747a63484 100644 --- a/vendor/github.com/vbauerster/mpb/cwriter/writer_windows.go +++ b/vendor/github.com/vbauerster/mpb/cwriter/writer_windows.go @@ -8,7 +8,7 @@ import ( "syscall" "unsafe" - "github.com/mattn/go-isatty" + isatty "github.com/mattn/go-isatty" ) var kernel32 = syscall.NewLazyDLL("kernel32.dll") |