Remove terminal.Writer

terminal.Writer is now just a wrapper around stdio.Stdout() without
any useful functionality.  Replace it with stdio.Stdout() as an
io.Writer.

Test: ui/terminal/status_test.go
Change-Id: I5bc5476afdca950b505642f0135a3af9d37fbe24
This commit is contained in:
Colin Cross
2019-06-08 21:48:58 -07:00
parent ce525350f4
commit 097ed2a37c
12 changed files with 90 additions and 183 deletions

View File

@@ -15,6 +15,8 @@
package terminal
import (
"io"
"android/soong/ui/status"
)
@@ -24,10 +26,10 @@ import (
//
// statusFormat takes nearly all the same options as NINJA_STATUS.
// %c is currently unsupported.
func NewStatusOutput(w Writer, statusFormat string, quietBuild bool) status.StatusOutput {
func NewStatusOutput(w io.Writer, statusFormat string, quietBuild bool) status.StatusOutput {
formatter := newFormatter(statusFormat, quietBuild)
if w.isSmartTerminal() {
if isSmartTerminal(w) {
return NewSmartStatusOutput(w, formatter)
} else {
return NewDumbStatusOutput(w, formatter)