Fix ANSI color output on Windows

This commit is contained in:
Mislav Marohnić 2019-11-27 15:43:28 +01:00
parent b21b93abe9
commit 4be04aded3

View file

@ -5,6 +5,7 @@ import (
"io"
"os"
"github.com/mattn/go-colorable"
"golang.org/x/crypto/ssh/terminal"
)
@ -24,7 +25,7 @@ func NewTablePrinter(w io.Writer) TablePrinter {
ttyWidth = w
}
return &ttyTablePrinter{
out: w,
out: colorable.NewColorable(outFile),
maxWidth: ttyWidth,
}
}