termstatus: additional comments

This commit is contained in:
Michael Eischer
2025-09-21 17:17:24 +02:00
parent 76b2cdd4fb
commit b459d66288
2 changed files with 10 additions and 2 deletions

View File

@@ -164,6 +164,8 @@ func (t *Terminal) CanUpdateStatus() bool {
return t.canUpdateStatus
}
// OutputWriter returns a output writer that is safe for concurrent use with
// other output methods. Output is only shown after a line break.
func (t *Terminal) OutputWriter() io.Writer {
t.outputWriterOnce.Do(func() {
t.outputWriter = newLineWriter(t.Print)
@@ -171,7 +173,7 @@ func (t *Terminal) OutputWriter() io.Writer {
return t.outputWriter
}
// OutputRaw returns the output writer. Should only be used if there is no
// OutputRaw returns the raw output writer. Should only be used if there is no
// other option. Must not be used in combination with Print, Error, SetStatus
// or any other method that writes to the terminal.
func (t *Terminal) OutputRaw() io.Writer {