diff --git a/cwriter/writer.go b/cwriter/writer.go index 7fea259..9ec1ec6 100644 --- a/cwriter/writer.go +++ b/cwriter/writer.go @@ -10,7 +10,7 @@ "golang.org/x/crypto/ssh/terminal" ) -// NotATTY not a TeleTYpewriter error +// NotATTY not a TeleTYpewriter error. var NotATTY = errors.New("not a terminal") var cuuAndEd = fmt.Sprintf("%c[%%dA%[1]c[J", 27) @@ -25,7 +25,7 @@ isTerminal bool } -// New returns a new Writer with defaults +// New returns a new Writer with defaults. func New(out io.Writer) *Writer { w := &Writer{out: out} if f, ok := out.(*os.File); ok { @@ -35,7 +35,7 @@ return w } -// Flush flushes the underlying buffer +// Flush flushes the underlying buffer. func (w *Writer) Flush(lineCount int) (err error) { if w.lineCount > 0 { w.clearLines() @@ -45,12 +45,12 @@ return } -// Write appends the contents of p to the underlying buffer +// Write appends the contents of p to the underlying buffer. func (w *Writer) Write(p []byte) (n int, err error) { return w.buf.Write(p) } -// WriteString writes string to the underlying buffer +// WriteString writes string to the underlying buffer. func (w *Writer) WriteString(s string) (n int, err error) { return w.buf.WriteString(s) }