|
|
@@ -69,6 +69,10 @@ type Writer struct {
|
|
|
}
|
|
|
|
|
|
func NewColorable(file *os.File) io.Writer {
|
|
|
+ if file == nil {
|
|
|
+ panic("nil passed instead of *os.File to NewColorable()")
|
|
|
+ }
|
|
|
+
|
|
|
if isatty.IsTerminal(file.Fd()) {
|
|
|
var csbi consoleScreenBufferInfo
|
|
|
handle := syscall.Handle(file.Fd())
|