Selaa lähdekoodia

Merge pull request #37 from toshimaru/typo

Add third person singular `s` in comments
mattn 6 vuotta sitten
vanhempi
commit
388941e3ea
4 muutettua tiedostoa jossa 14 lisäystä ja 14 poistoa
  1. 3 3
      colorable_appengine.go
  2. 3 3
      colorable_others.go
  3. 5 5
      colorable_windows.go
  4. 3 3
      noncolorable.go

+ 3 - 3
colorable_appengine.go

@@ -9,7 +9,7 @@ import (
 	_ "github.com/mattn/go-isatty"
 )
 
-// NewColorable return new instance of Writer which handle escape sequence.
+// NewColorable returns new instance of Writer which handles escape sequence.
 func NewColorable(file *os.File) io.Writer {
 	if file == nil {
 		panic("nil passed instead of *os.File to NewColorable()")
@@ -18,12 +18,12 @@ func NewColorable(file *os.File) io.Writer {
 	return file
 }
 
-// NewColorableStdout return new instance of Writer which handle escape sequence for stdout.
+// NewColorableStdout returns new instance of Writer which handles escape sequence for stdout.
 func NewColorableStdout() io.Writer {
 	return os.Stdout
 }
 
-// NewColorableStderr return new instance of Writer which handle escape sequence for stderr.
+// NewColorableStderr returns new instance of Writer which handles escape sequence for stderr.
 func NewColorableStderr() io.Writer {
 	return os.Stderr
 }

+ 3 - 3
colorable_others.go

@@ -10,7 +10,7 @@ import (
 	_ "github.com/mattn/go-isatty"
 )
 
-// NewColorable return new instance of Writer which handle escape sequence.
+// NewColorable returns new instance of Writer which handles escape sequence.
 func NewColorable(file *os.File) io.Writer {
 	if file == nil {
 		panic("nil passed instead of *os.File to NewColorable()")
@@ -19,12 +19,12 @@ func NewColorable(file *os.File) io.Writer {
 	return file
 }
 
-// NewColorableStdout return new instance of Writer which handle escape sequence for stdout.
+// NewColorableStdout returns new instance of Writer which handles escape sequence for stdout.
 func NewColorableStdout() io.Writer {
 	return os.Stdout
 }
 
-// NewColorableStderr return new instance of Writer which handle escape sequence for stderr.
+// NewColorableStderr returns new instance of Writer which handles escape sequence for stderr.
 func NewColorableStderr() io.Writer {
 	return os.Stderr
 }

+ 5 - 5
colorable_windows.go

@@ -81,7 +81,7 @@ var (
 	procCreateConsoleScreenBuffer  = kernel32.NewProc("CreateConsoleScreenBuffer")
 )
 
-// Writer provide colorable Writer to the console
+// Writer provides colorable Writer to the console
 type Writer struct {
 	out       io.Writer
 	handle    syscall.Handle
@@ -91,7 +91,7 @@ type Writer struct {
 	rest      bytes.Buffer
 }
 
-// NewColorable return new instance of Writer which handle escape sequence from File.
+// NewColorable returns new instance of Writer which handles escape sequence from File.
 func NewColorable(file *os.File) io.Writer {
 	if file == nil {
 		panic("nil passed instead of *os.File to NewColorable()")
@@ -106,12 +106,12 @@ func NewColorable(file *os.File) io.Writer {
 	return file
 }
 
-// NewColorableStdout return new instance of Writer which handle escape sequence for stdout.
+// NewColorableStdout returns new instance of Writer which handles escape sequence for stdout.
 func NewColorableStdout() io.Writer {
 	return NewColorable(os.Stdout)
 }
 
-// NewColorableStderr return new instance of Writer which handle escape sequence for stderr.
+// NewColorableStderr returns new instance of Writer which handles escape sequence for stderr.
 func NewColorableStderr() io.Writer {
 	return NewColorable(os.Stderr)
 }
@@ -414,7 +414,7 @@ func doTitleSequence(er *bytes.Reader) error {
 	return nil
 }
 
-// Write write data on console
+// Write writes data on console
 func (w *Writer) Write(data []byte) (n int, err error) {
 	var csbi consoleScreenBufferInfo
 	procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))

+ 3 - 3
noncolorable.go

@@ -5,17 +5,17 @@ import (
 	"io"
 )
 
-// NonColorable hold writer but remove escape sequence.
+// NonColorable holds writer but removes escape sequence.
 type NonColorable struct {
 	out io.Writer
 }
 
-// NewNonColorable return new instance of Writer which remove escape sequence from Writer.
+// NewNonColorable returns new instance of Writer which removes escape sequence from Writer.
 func NewNonColorable(w io.Writer) io.Writer {
 	return &NonColorable{out: w}
 }
 
-// Write write data on console
+// Write writes data on console
 func (w *NonColorable) Write(data []byte) (n int, err error) {
 	er := bytes.NewReader(data)
 	var bw [1]byte