type Writer struct {
RawOutFd int Mutex *sync.Mutex Writer io.Writer IsTTY bool// Used for flicker-free persistent objects like the progressbars PersistentText func()
}
Writer syncs writes with a mutex and, if the output is a TTY, clears before
newlines.