From 6bf3ea614087c52ead8ca75259c5fd1226b361e2 Mon Sep 17 00:00:00 2001 From: Faissal Elamraoui Date: Mon, 1 Aug 2016 11:41:25 +0200 Subject: [PATCH] Fixed bug in color writer for Windows --- colorwriter_windows.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/colorwriter_windows.go b/colorwriter_windows.go index d257f54..0a8e88f 100644 --- a/colorwriter_windows.go +++ b/colorwriter_windows.go @@ -320,15 +320,15 @@ func parseEscapeSequence(command byte, param []byte) parseResult { } } -func (cw *ansiColorWriter) flushBuffer() (int, error) { +func (cw *colorWriter) flushBuffer() (int, error) { return cw.flushTo(cw.w) } -func (cw *ansiColorWriter) resetBuffer() (int, error) { +func (cw *colorWriter) resetBuffer() (int, error) { return cw.flushTo(nil) } -func (cw *ansiColorWriter) flushTo(w io.Writer) (int, error) { +func (cw *colorWriter) flushTo(w io.Writer) (int, error) { var n1, n2 int var err error @@ -359,7 +359,7 @@ func isParameterChar(b byte) bool { return ('0' <= b && b <= '9') || b == separatorChar } -func (cw *ansiColorWriter) Write(p []byte) (int, error) { +func (cw *colorWriter) Write(p []byte) (int, error) { r, nw, first, last := 0, 0, 0, 0 if cw.mode != DiscardNonColorEscSeq { cw.state = outsideCsiCode