فهرست منبع

inherit io.Writer

mattn 11 سال پیش
والد
کامیت
200aed43a9
2فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 2 1
      colorable_others.go
  2. 2 1
      colorable_windows.go

+ 2 - 1
colorable_others.go

@@ -3,9 +3,10 @@
 package colorable
 
 import (
+	"io"
 	"os"
 )
 
-func NewColorableWriter() *Writer {
+func NewColorableStdout() io.Writer {
 	return os.Stdout
 }

+ 2 - 1
colorable_windows.go

@@ -3,6 +3,7 @@ package colorable
 import (
 	"bytes"
 	"fmt"
+	"io"
 	"os"
 	"strconv"
 	"strings"
@@ -59,7 +60,7 @@ type Writer struct {
 	lastbuf bytes.Buffer
 }
 
-func NewColorableWriter() *Writer {
+func NewColorableStdout() io.Writer {
 	return &Writer{out: syscall.Handle(os.Stdout.Fd())}
 }