summaryrefslogtreecommitdiff
path: root/doc/play
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2013-07-23 11:59:49 +1000
committerRob Pike <r@golang.org>2013-07-23 11:59:49 +1000
commitc13c56605db83bd775736616f9e19837b93ede97 (patch)
tree566fc71200824838df66c0dc4203e42e2c2901de /doc/play
parente8ee29cd4005834559698014a75e0692cbce351f (diff)
downloadgo-c13c56605db83bd775736616f9e19837b93ede97.tar.gz
all: be more idiomatic when documenting boolean return values.
Phrases like "returns whether or not the image is opaque" could be describing what the function does (it always returns, regardless of the opacity) or what it returns (a boolean indicating the opacity). Even when the "or not" is missing, the phrasing is bizarre. Go with "reports whether", which is still clunky but at least makes it clear we're talking about the return value. These were edited by hand. A few were cleaned up in other ways. R=golang-dev, dsymonds CC=golang-dev https://codereview.appspot.com/11699043
Diffstat (limited to 'doc/play')
-rw-r--r--doc/play/life.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/play/life.go b/doc/play/life.go
index 08271761c..51afb61f3 100644
--- a/doc/play/life.go
+++ b/doc/play/life.go
@@ -28,7 +28,7 @@ func (f *Field) Set(x, y int, b bool) {
f.s[y][x] = b
}
-// Alive returns whether the specified cell is alive.
+// Alive reports whether the specified cell is alive.
// If the x or y coordinates are outside the field boundaries they are wrapped
// toroidally. For instance, an x value of -1 is treated as width-1.
func (f *Field) Alive(x, y int) bool {