Move smart and dumb terminals into separate implementations
Support for smart and dumb terminals are implemented in writer.go,
which makes dumb terminals much more complicated than necessary.
Move smart and dumb terminals into two separate implementations
of StatusOutput, with common code moved into a shared formatter
class.
Test: not yet
Change-Id: I59bbdae479f138b46cd0f03092720a3303e8f0fe
diff --git a/ui/terminal/util.go b/ui/terminal/util.go
index 4309809..3a11b79 100644
--- a/ui/terminal/util.go
+++ b/ui/terminal/util.go
@@ -22,7 +22,7 @@
"unsafe"
)
-func isTerminal(w io.Writer) bool {
+func isSmartTerminal(w io.Writer) bool {
if f, ok := w.(*os.File); ok {
var termios syscall.Termios
_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, f.Fd(),