Skip to content

Commit

Permalink
Merge pull request #37 from toshimaru/typo
Browse files Browse the repository at this point in the history
Add third person singular `s` in comments
  • Loading branch information
mattn committed Aug 18, 2019
2 parents c52ace1 + db913df commit 388941e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions colorable_appengine.go
Expand Up @@ -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()")
Expand All @@ -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
}
6 changes: 3 additions & 3 deletions colorable_others.go
Expand Up @@ -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()")
Expand All @@ -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
}
10 changes: 5 additions & 5 deletions colorable_windows.go
Expand Up @@ -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
Expand All @@ -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()")
Expand All @@ -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)
}
Expand Down Expand Up @@ -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)))
Expand Down
6 changes: 3 additions & 3 deletions noncolorable.go
Expand Up @@ -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
Expand Down

0 comments on commit 388941e

Please sign in to comment.