Go documentation style for boolean funcs is to say: // Foo reports whether ... func Foo() bool (rather than "returns true if") Change-Id: I6972d123ba99bbf3dbf95e876b45b2ecd98dd07c Reviewed-on: https://go-review.googlesource.com/c/151257 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@@ -25,7 +25,7 @@ type State struct {
termios unix.Termios
}
-// IsTerminal returns true if the given file descriptor is a terminal.
+// IsTerminal returns whether the given file descriptor is a terminal.
func IsTerminal(fd int) bool {
_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
return err == nil
@@ -21,7 +21,7 @@ import (
type State struct{}
return false
@@ -17,7 +17,7 @@ type State struct {
_, err := unix.IoctlGetTermio(fd, unix.TCGETA)
@@ -26,7 +26,7 @@ type State struct {
mode uint32
var st uint32
err := windows.GetConsoleMode(windows.Handle(fd), &st)